Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Replace budget_tokens approach with new effort parameter:

  • ANTHROPIC_EFFORT maps thinking levels to 'low' | 'medium' | 'high'
  • SDK auto-adds effort-2025-11-24 beta header when effort is set
  • Remove calculateEffectiveMaxOutputTokens (no longer needed with effort)
  • Effort controls all token spend: thinking, text, and tool calls

Net: -86 lines of workaround code removed.

Generated with mux

Replace budget_tokens approach with new effort parameter:
- ANTHROPIC_EFFORT maps thinking levels to 'low' | 'medium' | 'high'
- SDK auto-adds 'effort-2025-11-24' beta header
- Remove calculateEffectiveMaxOutputTokens (no longer needed)
- Effort controls all token spend: thinking, text, and tool calls

_Generated with mux_
@ammar-agent ammar-agent force-pushed the implement-effort-parameter branch from e564a50 to b7826b6 Compare November 25, 2025 00:44
@chatgpt-codex-connector
Copy link

💡 Codex Review

providerOptions,
maxOutputTokens,

P1 Badge Clamp Anthropic output tokens to model limits

Removing calculateEffectiveMaxOutputTokens now forwards the user’s maxOutputTokens directly to startStream, which defaults to 32k tokens (see src/node/services/streamManager.ts:531). Anthropic models in src/common/utils/tokens/models.json top out at ~8k max_output_tokens, so any Anthropics request without an explicit cap (or with one above 8k) will now request more tokens than the model allows and will be rejected or truncated. Please retain provider-specific clamping when using the new effort parameter so Anthropic calls don’t fail by default.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ammario ammario merged commit 3e8ffb8 into main Nov 25, 2025
13 checks passed
@ammario ammario deleted the implement-effort-parameter branch November 25, 2025 01:00
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.

2 participants