Skip to content

fix(codex): correct reported context token metadata - #151

Open
mossgowild wants to merge 1 commit into
smallmain:mainfrom
mossgowild:reported-max-output-tokens
Open

fix(codex): correct reported context token metadata#151
mossgowild wants to merge 1 commit into
smallmain:mainfrom
mossgowild:reported-max-output-tokens

Conversation

@mossgowild

Copy link
Copy Markdown
Contributor

Fixes #150

Summary

  • adds reportedMaxOutputTokens so VS Code can receive output-token metadata for context window display without sending max_output_tokens to provider APIs
  • updates Codex OAuth model metadata to report real prompt/input budgets, including gpt-5.5 as 272000 input tokens with a reported 128000 output reserve
  • documents the new model configuration field in English and Chinese docs and settings metadata

Why

VS Code/Copilot uses maxInputTokens as the prompt budget for extension-contributed language models. Reporting an oversized Codex input budget can cause VS Code to include too much context and send requests beyond the real Codex API input limit.

At the same time, Codex OAuth should not receive explicit max_output_tokens, so output-reserve metadata needs to be reported separately from the request parameter source.

Validation

  • npm run compile
  • npm run l10n:check

@smallmain

Copy link
Copy Markdown
Owner

#75

I am not merging this PR for now because I analyzed how VS Code currently handles maxOutputTokens in context compression, and it only uses a fixed value. I will wait until the situation possibly changes.

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.

Codex model metadata overstates prompt token budget

2 participants