The regex was checking for claude-sonnet-4-5 but the source code
uses claude-sonnet-4-6, causing a null match and test failure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add claude-sonnet-4-6 and claude-opus-4-6 as the new default Sonnet and
Opus models across providers, GUI configs, schemas, cost calculation,
and CLI defaults. Update display names for all >= 4.5 models to use
name-first format (e.g. "Claude Sonnet 4.5" not "Claude 4.5 Sonnet").
- Moved getAdjustedTokenCountFromModel function from CLI tokenizer to core/llm/countTokens.ts
- Updated core countTokens() to use getAdjustedTokenCountFromModel for all models
- Added comprehensive tests for getAdjustedTokenCountFromModel in core
- Updated CLI tokenizer to import getAdjustedTokenCountFromModel from core
- Removed duplicate implementation and constants from CLI
This consolidates the token adjustment logic in one place and ensures
consistent token counting across CLI and core. The llama tokenizer is
now used for all models with appropriate multipliers for Claude (1.23x),
Gemini (1.18x), and Mistral family (1.26x) models.
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: dallin <dallin@continue.dev>
Improves debugging capabilities for the metadata endpoint by logging
at info level with full URL, timing, request body, and response status.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace console.log calls with logger.info in displaySessionUsage function
for consistency with codebase logging patterns.
Co-authored-by: nate <nate@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
Address code review feedback:
1. Add fallback to use compacted history directly when ChatHistoryService
is unavailable (fixes P1 issue in handlePostToolValidation and
handleNormalAutoCompaction)
2. Prevent double-counting of system message tokens by checking if
system message is already in history before subtracting tokens
3. Remove tool output name from token count since it's not sent to model
This ensures compaction works correctly in headless contexts and provides
more accurate token estimation.
Co-authored-by: nate <nate@continue.dev>
The function was incorrectly treating lines like '+++counter;' or '---counter;'
as diff file headers and skipping them. This happened when code containing
++ or -- operators at the start of a line was added or removed.
Fixed by checking that file header lines (--- a/file, +++ b/file) contain
a space after the --- or +++ prefix, distinguishing them from code changes.
Added test cases to verify the fix handles these edge cases correctly.
Co-authored-by: nate <nate@continue.dev>
* feat: add GPT-5 Codex model support
- Add GPT-5 Codex to llm-info package with 500k context and 150k max tokens
- Add model definition to models.ts for UI configuration
- Include GPT-5 Codex in OpenAI provider packages list
- Model supports chat and edit roles with tool_use capability
* feat: impl Responses API in oai-adapters
* fix chat describer
* Update openai.ts
* fix llm-info
* address dallin's feedback