Files
kirogo/proxy/translator_test.go
huangzhenpc 6d1d1c68a9 fix(translator): prevent silent model downgrade with boundary-aware matching
- Add missing claude-sonnet-4-7/4.7 and claude-haiku-4-7/4.7 mappings;
  previously claude-sonnet-4.7 was substring-matched by the bare
  "claude-sonnet-4" key and silently downgraded to claude-sonnet-4.
- Introduce modelMapping.boundary flag and modelKeyMatches() helper.
  Bare digit-ending keys (like claude-sonnet-4) now require the next
  character to NOT be a digit, dot, or dash-digit, so future versions
  (4.8, 5.x) also pass through without silent downgrade.
- Add 8 regression tests in TestParseModelAndThinkingNoSilentDowngrade
  covering the 4.7 family, hypothetical 4.8, Bedrock-style names, and
  thinking-suffix variants.
2026-05-11 19:16:05 +08:00

9.9 KiB