Skip to content

Map model token limits to native settings - #786

Merged
SaladDay merged 5 commits into
mainfrom
map-model-token-limits-to-native-settings
Oct 19, 2026
Merged

SaladDay merged 5 commits into
mainfrom
map-model-token-limits-to-native-settings

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Each Harness now receives the model provider's token limits through its native setting, and Core rejects a limit the Harness cannot run.

  • Codex: context_window → model_context_window. Codex has no native output limit, so a set max_output_tokens returns model_provider_token_limits_invalid.
  • Claude Code: CLAUDE_CODE_MAX_CONTEXT_TOKENS and CLAUDE_CODE_MAX_OUTPUT_TOKENS. Native uses the first only for a model it does not know and caps the second at the model's limit.
  • MiniMax Code: the custom model's limit.context and limit.output, unchanged.
  • The declaration's MaxOutputTokens is the only source of this fact. /core/v1/harnesses projects it as model_configuration_support.accepts_max_output_tokens, and Web shows the Max output tokens field only when it is true.
  • Docs: the model-execution protocols table gains a native token limits column, and the core-errors row is updated, in English and Chinese.
  • Claude workspace launches drop daemon CLAUDE_CODE_MAX_*_TOKENS, so only the provider sets them; the client accepts an output limit without a context window, as Core does.

Release notes: a Codex Session, saved Agent or deployment default that stores max_output_tokens was accepted and ignored; it now fails at use with model_provider_token_limits_invalid. Remove the field.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay force-pushed the map-model-token-limits-to-native-settings branch from 472880d to 68774d2 Compare October 19, 2026 19:06
@SaladDay
SaladDay merged commit c7ddd26 into main Oct 19, 2026
25 checks passed
@SaladDay
SaladDay deleted the map-model-token-limits-to-native-settings branch October 19, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant