Skip to content

Stop sending contextWindow as the request max_tokens - #933

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7784-contextwindow-max-tokens-split
Sep 12, 2026
Merged

Stop sending contextWindow as the request max_tokens#933
TheGreatAxios merged 1 commit into
mainfrom
cl-7784-contextwindow-max-tokens-split

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Setting contextWindow no longer changes the request output budget; every provider branch keeps the shared source default
  • contextWindow still drives compaction and the status-bar meter via contextWindowFor, and the provider-branch behavior is now documented in IMPLEMENTATION.md
  • Defers a dedicated maxOutputTokens setting to a follow-up; no new setting is added here
  • No in-tree default or operator config sets contextWindow (only tests reference it), so no existing deployment changes behavior

Verification

  • bun test src/config/inference-sources.test.ts src/provider/context-window.test.ts src/provider/openai-compatible-adapter.test.ts src/pricing-metadata.test.ts src/cost/cost-summary.test.ts tests/unit/context-window.test.ts passes (73 pass, 0 fail)
  • bun test src/config.test.ts passes (94 pass, 0 fail)
  • bun run check passes (lint, typecheck, build, 6982 pass, 0 fail)
  • New regression test proves contextWindow 400000 yields max_tokens 16384, not 400000, while contextWindowFor still returns 400000

Fixes CL-7784

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

CL-7784

@TheGreatAxios
TheGreatAxios merged commit b52aaa2 into main Sep 12, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7784-contextwindow-max-tokens-split branch September 12, 2026 05:03
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