- Grouped function parameters into HandleToolCallsOptions interface
- Reduced parameter count from 6 to 1 (options object)
- Updated call site in streamChatResponse.ts to use new signature
Co-authored-by: nate <nate@continue.dev>
Add per-message cost tracking by capturing usage data from LLM API
responses and attaching it to assistant messages when saved to session.
- Update addAssistantMessage to accept usage parameter
- Modify handleToolCalls to pass usage to message creation
- Enhance processStreamingResponse to return usage with model and cost
- Calculate cost in cents and include model name in usage metadata
This enables the control plane cost analysis page to display accurate
per-message costs without client-side token estimation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove totalCost property from Session objects (should be in usage object)
- Add trackSessionUsage to test mocks for streamChatResponse tests
- Fixes TypeScript compilation errors and test failures
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>
Reorder imports to comply with ESLint import/order rules:
- Move vitest imports after core imports
- Add empty line between import groups
- Move services import before local imports
Co-authored-by: nate <nate@continue.dev>
Add required systemMessage parameter to all processStreamingResponse calls
in the test file to match the updated interface signature.
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