claude-code-router/packages
o.akimov 41b74d65a0 Fix Gemini/Gemma streaming, autocompact, and tool schema sanitization
- gemini.util.ts: flush pendingContent on stream end, fixing lost text for
  Gemma models with thinking but no thoughtSignature (e.g. gemma-4-31b-it);
  map Gemini 400 context-too-long errors to finish_reason
  "model_context_window_exceeded" to trigger Claude Code autocompact;
  remove temporary debug logs

- anthropic.transformer.ts: pass through model_context_window_exceeded as
  stop_reason in both streaming and non-streaming paths

- schema.ts (new): sanitizeJsonSchema strips unknown fields via whitelist and
  removes invalid format/enum/uri combinations; fixes bug where property
  schemas bypassed the whitelist; normalizeToolParameters wraps it for tools

- groq.transformer.ts, mistral.util.ts: use normalizeToolParameters for full
  schema sanitization instead of only deleting $schema

- gemini.transformer.ts: resolve model name from context before URL build

- vertex-gemini.transformer.ts: fall back to provider.model when request.model
  is empty
2026-04-25 23:35:20 +02:00
..
cli refactor: localize codebase by translating all comments to English 2026-04-24 23:14:13 +02:00
core Fix Gemini/Gemma streaming, autocompact, and tool schema sanitization 2026-04-25 23:35:20 +02:00
server refactor: localize codebase by translating all comments to English 2026-04-24 23:14:13 +02:00
shared refactor: localize codebase by translating all comments to English 2026-04-24 23:14:13 +02:00
ui refactor: localize codebase by translating all comments to English 2026-04-24 23:14:13 +02:00