fix: surface resolved model limits (#1608)

Signed-off-by: ulofiai <monsterking@tutamail.com>
Co-authored-by: ulofiai <monsterking@tutamail.com>
This commit is contained in:
ulofiai
2026-08-20 16:17:36 -07:00
committed by GitHub
co-authored by ulofiai
parent f3f2789f0a
commit 2ca5fb4027
3 changed files with 142 additions and 0 deletions
+23
View File
@@ -275,6 +275,29 @@ For provider-specific models:
# ... other inputs
```
### 1M context models through an API gateway
When `ANTHROPIC_BASE_URL` points to an Anthropic-compatible API gateway,
Claude Code may not be able to verify that the gateway supports a model's native
1M context window and can budget the session at 200K instead. Append the
`[1m]` selector to explicitly use the 1M context window for supported models,
including Claude Opus 5 and Claude Sonnet 5:
```yaml
- uses: anthropics/claude-code-action@v1
with:
claude_args: |
--model "claude-opus-5[1m]"
# ... other inputs
```
Use the same selector when setting a model through `ANTHROPIC_MODEL` or another
Claude Code model environment variable. The selector is resolved by Claude Code
before requests are sent to the provider. The action's sanitized result output
includes each model's resolved
`contextWindow` and `maxOutputTokens` under `modelUsage`, so these limits are
visible without enabling `show_full_output`.
## Claude Code Settings
You can provide Claude Code settings to customize behavior such as model selection, environment variables, permissions, and hooks. Settings can be provided either as a JSON string or a path to a settings file.