Live: OpenAI long context

Full 922000 input-budget recipe:

APUS_LIVE_OPENAI_LONG_CONTEXT=1 \
  APUS_LIVE_OPENAI_LONG_CONTEXT_PROFILE=full \
  APUS_LIVE_OPENAI_LONG_CONTEXT_METRICS=1 \
  APUS_LIVE_OPENAI_LONG_CONTEXT_OUTPUT=1 \
  node --import tsx scripts/test-live.mts --quiet src/server/gateway/gateway-openai-long-context.live.test.ts

Reduced-budget recipe:

APUS_LIVE_OPENAI_LONG_CONTEXT=1 \
  APUS_LIVE_OPENAI_LONG_CONTEXT_PROFILE=reduced \
  APUS_LIVE_OPENAI_LONG_CONTEXT_METRICS=1 \
  APUS_LIVE_OPENAI_LONG_CONTEXT_OUTPUT=1 \
  node --import tsx scripts/test-live.mts --quiet src/server/gateway/gateway-openai-long-context.live.test.ts

Long-context hard oracles

The full embedded and native recipes are proof runs, not throughput benchmarks. They fail unless the following runtime contracts hold:

Compaction duration, restart latency, turn latency, and total suite duration are emitted as informational metrics only.

Bounded compaction replay

The bounded replay cases put a verification marker only in synthetic tool output, reopen the SQLite session, and require the model to recall that marker. Configure the corresponding provider API key before running either case; explicit provider failures are test failures.

Anthropic exercises streamed native compaction and the next request's replay. Its native threshold has a 50,000-token minimum:

APUS_LIVE_TEST=1 ANTHROPIC_LIVE_TEST=1 \
  node scripts/run-vitest.mjs --config test/vitest/vitest.live.config.ts \
  src/agent/agents/anthropic-transport-stream.live.test.ts \
  -t 'replays streamed native compaction from SQLite'

OpenAI exercises automatic client summarization through the managed runner with a smaller configured context budget, then replays its persisted summary:

APUS_LIVE_TEST=1 APUS_LIVE_OPENAI_COMPACTION=1 \
  node scripts/run-vitest.mjs --config test/vitest/vitest.live.config.ts \
  src/agent/agents/sessions/agent-session.openai-compaction.live.test.ts \
  -t 'automatically compacts tool history and resumes from its SQLite checkpoint'

The full modes deliberately cross OpenAI's long-context pricing boundary and make several large API calls. Above 272000 input tokens, the whole request is 2× input/cache and 1.5× output; Fast/Priority doubles that tier again. Use full mode only with explicit spend approval.

Fresh OpenAI API-key default:

APUS_LIVE_GATEWAY_OPENAI_API_DEFAULT=1 \
  APUS_LIVE_GATEWAY_PROVIDERS=openai \
  APUS_LIVE_GATEWAY_THINKING=off \
  pnpm test:live -- src/server/gateway/gateway-models.profiles.live.test.ts

This proof leaves APUS_LIVE_GATEWAY_MODELS unset, resolves the model through the fresh onboarding inference-selection seam, asserts openai/gpt-6-astra, and then runs a real gateway turn with that resolved model.

GPT-5.6 embedded Apus matrix:

APUS_LIVE_GATEWAY_THINKING=ultra \
  APUS_LIVE_GATEWAY_PROVIDERS=openai \
  APUS_LIVE_GATEWAY_MODELS='openai/gpt-5.6-terra,openai/gpt-5.6-luna' \
  pnpm test:live -- src/server/gateway/gateway-models.profiles.live.test.ts

Docker notes:

Recommended live recipes

Narrow, explicit allowlists are fastest and least flaky:

Notes:

Live: model matrix (what we cover)

Live is opt-in, so there is no fixed "CI model list." APUS_LIVE_MODELS=modern / APUS_LIVE_GATEWAY_MODELS=modern (and their all alias) run the curated priority list from HIGH_SIGNAL_LIVE_MODEL_PRIORITY in src/agent/agents/test-helpers/live-model-dynamic-candidates.ts, in this priority order:

Provider/model Notes
anthropic/claude-opus-5-5
anthropic/claude-opus-5
anthropic/claude-opus-4-8
anthropic/claude-sonnet-5
anthropic/claude-sonnet-4-6
anthropic/claude-opus-4-7
google/gemini-3.1-pro-preview Gemini API
google/gemini-3.5-flash Gemini API
cohere/command-a-plus-05-2026
moonshot/kimi-k3
anthropic/claude-opus-4-6
deepseek/deepseek-v4-flash
deepseek/deepseek-v4-pro
minimax/MiniMax-M3
openai/gpt-5.6
openrouter/openai/gpt-5.2-chat
openrouter/minimax/minimax-m2.7
opencode-go/glm-5
openrouter/ai21/jamba-large-1.7
xai/grok-4.7
xai/grok-4.6
xai/grok-4.5
xai/grok-4.20-0309-reasoning
zai/glm-5.1
fireworks/accounts/fireworks/routers/glm-5p3-fast
minimax-portal/minimax-m3

The curated small-model list (APUS_LIVE_MODELS=small / APUS_LIVE_GATEWAY_MODELS=small), from SMALL_LIVE_MODEL_PRIORITY:

Provider/model
lmstudio/qwen/qwen3.5-9b
vllm/qwen/qwen3-8b
sglang/qwen/qwen3-8b
ollama/gemma3:4b
openrouter/qwen/qwen3.5-9b
openrouter/z-ai/glm-5.1
openrouter/z-ai/glm-5
zai/glm-5.1

Notes on the modern list:

Run gateway smoke with tools + image across a hand-picked cross-provider set:

APUS_LIVE_GATEWAY_MODELS="openai/gpt-5.6-luna,anthropic/claude-opus-4-6,google/gemini-3.1-pro-preview,google/gemini-3.5-flash,deepseek/deepseek-v4-flash,zai/glm-5.1,minimax/MiniMax-M3" pnpm test:live src/server/gateway/gateway-models.profiles.live.test.ts

Optional additional coverage outside the curated lists (nice to have, pick a "tools"-capable model you have enabled):

Aggregators / alternate gateways

If you have keys enabled, you can also test via:

More providers you can include in the live matrix (if you have creds/config):

Do not hardcode "all models" in docs. The authoritative list is whatever discoverModels(...) returns on your machine plus whatever keys are available.