Compare commits

..

7 Commits

Author SHA1 Message Date
Haileyesus
15d7419a3c fix: harden token usage reporting
Token usage is shown as concrete counts, so malformed provider payloads must not leak NaN.

Gemini can emit token fields as strings or invalid values, so non-finite values now fall back to 0.

OpenCode token reads happen while the CLI is shutting down, when the DB may be missing or locked.

Those failures now return null instead of interrupting session completion.

/cost no longer invents an input breakdown from an aggregate total.

When a provider only supplies total usage, the UI now says the breakdown is unavailable.

This keeps the display honest instead of presenting made-up input and output rows.

Verification: npm run typecheck; targeted eslint.
2026-05-29 17:41:19 +03:00
Haileyesus
d0cc85e76b fix: refine token usage reporting
The old token UI mixed context pressure, cache counters, and dollar estimates.

That made the percentage look precise even when provider data was incomplete or different.

The composer and /cost view now show concrete counts instead of a pie percentage.

Token payloads now share a smaller shape: used, inputTokens, outputTokens, and breakdown.

Claude uses per-step usage where available and Codex reads total_token_usage events.

Gemini reads its tokens object without inventing a context window.

OpenCode reads opencode.db session totals and includes all token columns in used.

The /cost backend no longer returns cache display fields or input/output dollar estimates.

This avoids derived values that look reliable but are not comparable across providers.

Verification: npm run typecheck; targeted eslint; OpenCode session provider test.
2026-05-29 15:06:55 +03:00
Haileyesus
661b8bd137 fix: update claude default model 2026-05-29 14:06:37 +03:00
Haileyesus
b80c7105d4 fix(claude): force fallback models and disable supportedModels lookup 2026-05-29 13:56:37 +03:00
Haileyesus
6f8fd37ab0 Merge branch 'main' of https://github.com/siteboon/claudecodeui 2026-05-29 13:55:17 +03:00
Haileyesus
50b3b90235 feat(cursor): update fallback models 2026-05-28 20:54:16 +03:00
Haileyesus
dd6614bca3 fix: remove the hide cursor on windows logic 2026-05-28 20:50:46 +03:00

View File

@@ -36,7 +36,7 @@ export const CLAUDE_FALLBACK_MODELS: ProviderModelsDefinition = {
description: 'Haiku 4.5 · Fastest for quick answers · $1/$5 per Mtok', description: 'Haiku 4.5 · Fastest for quick answers · $1/$5 per Mtok',
}, },
], ],
DEFAULT: 'default', DEFAULT: 'sonnet',
}; };
type ClaudeInitEvent = { type ClaudeInitEvent = {
sessionId?: string; sessionId?: string;