Skip to content

fix(kiro): normalize version separator mid-identifier#144

Open
tonybase wants to merge 1 commit into
kaitranntt:mainfrom
tonybase:fix/kiro-version-separator
Open

fix(kiro): normalize version separator mid-identifier#144
tonybase wants to merge 1 commit into
kaitranntt:mainfrom
tonybase:fix/kiro-version-separator

Conversation

@tonybase

Copy link
Copy Markdown

Summary

normalizeKiroVersion converts a dash version separator into a dot in Kiro backend model IDs (e.g. claude-sonnet-4-5claude-sonnet-4.5). The previous implementation only rewrote a trailing <digit>-<digit> pair, so IDs where the version sits mid-identifier were left with a dash and never resolved:

  • gpt-5-6-terra stayed gpt-5-6-terra (should be gpt-5.6-terra)
  • kimi-k2-7-code stayed kimi-k2-7-code (should be kimi-k2.7-code)

Fix

Rewrite the first dash that sits directly between two digits (<digit>-<digit>). This handles the version wherever it appears, and rewriting only the first such dash keeps trailing build/date segments intact:

  • gpt-5-6-terragpt-5.6-terra
  • kimi-k2-7-codekimi-k2.7-code
  • grok-4-20-0309-reasoninggrok-4.20-0309-reasoning (only the first pair collapses)
  • claude-sonnet-4-5claude-sonnet-4.5 (unchanged behavior)
  • glm-5 / claude-sonnet-5 → unchanged (single digit segment, no digit-dash-digit)

Testing

Added table cases in kiro_executor_test.go covering gpt/kimi/deepseek/grok variants plus the single-segment no-op. go test ./internal/runtime/executor/ passes and go build ./cmd/server is clean.

🤖 Generated with Claude Code

normalizeKiroVersion only rewrote a trailing "<digit>-<digit>" pair to a
dot, so backend IDs where the version sits mid-identifier were left with a
dash (e.g. "gpt-5-6-terra", "kimi-k2-7-code"). Rewrite the first dash that
sits directly between two digits instead, which correctly produces
"gpt-5.6-terra" while leaving trailing build/date segments like
"grok-4-20-0309" → "grok-4.20-0309" intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant