fix(kiro): normalize version separator mid-identifier#144
Open
tonybase wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalizeKiroVersionconverts a dash version separator into a dot in Kiro backend model IDs (e.g.claude-sonnet-4-5→claude-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-terrastayedgpt-5-6-terra(should begpt-5.6-terra)kimi-k2-7-codestayedkimi-k2-7-code(should bekimi-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-terra→gpt-5.6-terrakimi-k2-7-code→kimi-k2.7-codegrok-4-20-0309-reasoning→grok-4.20-0309-reasoning(only the first pair collapses)claude-sonnet-4-5→claude-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.gocovering gpt/kimi/deepseek/grok variants plus the single-segment no-op.go test ./internal/runtime/executor/passes andgo build ./cmd/serveris clean.🤖 Generated with Claude Code