mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 03:18:54 +08:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user