Context Window & Compaction
The context window includes the conversation, model replies, tool output, and files read by an agent. Read the production value instead of assuming every model has 200K tokens:
curl -s https://api.nexotao.com/models | jq -r \
'.models[] | [.model, .context_window] | @tsv'Current Phase 1 windows
| Context | Model IDs |
|---|---|
| 10,000,000 | llama-4-scout-17b |
| 1,050,000 | gpt-5.6-terra |
| 1,000,000 | claude-opus-4-6, claude-sonnet-4-6, nova-2-lite, llama-4-maverick-17b, minimax-m2 |
| 400,000 | gpt-5.6-luna |
| 300,000 | nova-lite, nova-pro |
| 256,000 | mistral-large-3, devstral-2, qwen3-coder-30b, qwen3-coder-next, nemotron-super-120b, nemotron-nano-30b, kimi-k2-5 |
| 203,000 | glm-4-7 |
| 200,000 | claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5, glm-5 |
| 164,000 | deepseek-v3-2 |
| 128,000 | deepseek-r1, magistral-small, ministral-14b, ministral-8b, ministral-3b, nova-micro, llama-3-3-70b, gemma-3-27b, gpt-oss-120b, gpt-oss-20b |
| 32,000 | qwen3-32b |
The API is authoritative if these values change.
Claude Code setup
Use active Claude IDs so Claude Code can calibrate and compact correctly:
| Setting | Value |
|---|---|
ANTHROPIC_BASE_URL | https://api.nexotao.com |
ANTHROPIC_AUTH_TOKEN | your sk-nexo-... key |
ANTHROPIC_MODEL | claude-opus-4-6 |
ANTHROPIC_DEFAULT_OPUS_MODEL | claude-opus-4-6 |
ANTHROPIC_DEFAULT_SONNET_MODEL | claude-sonnet-4-6 |
ANTHROPIC_DEFAULT_HAIKU_MODEL | claude-haiku-4-5 |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | 1 |
See Claude Code for the config generator.
Keep long sessions healthy
- Let the client autocompact as it approaches the published window.
- Run
/compactbefore a large task or after reading many files. - Run
/clearwhen the current task is complete and history is no longer useful. - For clients without compaction, trim or summarize old turns yourself.
If the prompt is too large, the gateway returns 400 upstream.context_length_exceeded; compact, summarize, or split the input. A
413 request.too_large means the HTTP body itself exceeds the gateway limit.