mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
7a2de4cc3c
When switching models (e.g., via /model command or ctx.SetModel), the usage tracker now updates its model info to reflect the new model's: - Pricing for cost calculations - Context limits for percentage display - OAuth status (to show bash costs when using OAuth creds) Previously, token costs and context percentages continued using the old model's settings after a switch, causing incorrect display for: - Users switching from paid to free/OAuth models - Users switching between models with different pricing Changes: - Add UpdateModelInfo() method to UsageTracker - Call UpdateModelInfo() in both SetModel callbacks (extension and UI) - Add auth import for OAuth detection in root.go