Skip to content

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

Merged
kaitranntt merged 2 commits into
kaitranntt:mainfrom
tonybase:fix/kiro-version-separator
Jul 29, 2026
Merged

fix(kiro): normalize version separator mid-identifier#144
kaitranntt merged 2 commits into
kaitranntt:mainfrom
tonybase:fix/kiro-version-separator

Conversation

@tonybase

Copy link
Copy Markdown
Contributor

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

tonybase and others added 2 commits July 23, 2026 16:13
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>
@kaitranntt

Copy link
Copy Markdown
Owner

Maintainer adjustment pushed as 7df096b8: normalization is now bounded to known Kiro alias families, canonical dotted IDs and unknown/date-like IDs pass through, the mapping is idempotent, and caller docs/tests cover GPT 5.6, Kimi K2.7, DeepSeek 3.2, Grok 4.20, canonical inputs, and negative cases. Focused/race executor tests, full executor tests, vet, gofmt, build, diff check, and a fresh current-main merge-tree all passed. I will merge after the updated exact-head checks finish.

@kaitranntt
kaitranntt merged commit 7c764d5 into kaitranntt:main Jul 29, 2026
2 checks passed
@kaitranntt

Copy link
Copy Markdown
Owner

Released in v7.2.105-1 from exact merge commit 7c764d5. GoReleaser and multi-architecture Docker publication both passed. Darwin arm64 artifact checksum matched checksums.txt, and the binary reports 7.2.105-1-plus at commit 7c764d5.

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.

2 participants