Repository navigation
feat(models): sync model catalog with Kiro's current models - #289
Open
imtiyazakiwat wants to merge 1 commit into
Open
imtiyazakiwat wants to merge 1 commit into
imtiyazakiwat wants to merge 1 commit into
Conversation
…-5.6, Kimi K3) runtime.kiro.dev has no /ListAvailableModels, so FALLBACK_MODELS is the whole /v1/models catalog. It had fallen behind Kiro's current model list. - Add claude-opus-5.5, claude-sonnet-5.5, claude-opus-5, claude-sonnet-5, claude-opus-4.8, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna and kimi-k3 - Remove claude-sonnet-4 (end of life in Kiro on 2026-10-14, Kiro now rejects it). It is still passed through if a client requests it. - Add per-model tokenLimits.maxInputTokens from Kiro's catalog (kiro-cli context_window_tokens). Prompt tokens are derived from contextUsagePercentage, so 1M-context models were reported 5x too low with the 200K default. - Normalize the client model name before the context-window lookup, so claude-opus-4-6 and claude-opus-4-6[1m] use the claude-opus-4.6 limit - Accept the -latest suffix for models without a minor version (claude-opus-5-latest -> claude-opus-5), matching minor-version names - Docs: note paid-tier models and Sonnet 4 end of life in all READMEs
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
Author
|
I have read the CLA and I accept its terms |
This was referenced Oct 21, 2026
Ericwyn
added a commit
to Ericwyn/kiro-gateway-next
that referenced
this pull request
Oct 27, 2026
Adapt upstream model metadata, context accounting, normalization, tests, and docs to this fork. Co-authored-by: Imtiyaz Akiwat <94955223+imtiyazakiwat@users.noreply.github.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
runtime.kiro.devhas no/ListAvailableModels, soFALLBACK_MODELSis the entire/v1/modelscatalog for every account. It had fallen behind Kiro: 9 current models were missing and one end-of-life model was still listed.Fixes #208.
Changes
Catalog (
kiro/config.py): synced withkiro-cli chat --list-models --format json(checked 2026-10-20) and the Kiro models changelog.claude-opus-5.5,claude-sonnet-5.5,claude-opus-5,claude-sonnet-5,claude-opus-4.8,gpt-5.6-sol,gpt-5.6-terra,gpt-5.6-luna,kimi-k3.claude-sonnet-4. It reached end of life in Kiro on 2026-10-14 and Kiro now rejects it withInvalid model ID. It is still passed through if a client asks for it, so Kiro returns its own error.Context windows: every entry now carries
tokenLimits.maxInputTokens(from kiro-clicontext_window_tokens).contextUsagePercentage × maxInputTokens.sonnet-4.6,opus-4.6+, all 5.x,kimi-k3) was reported about 5x too low.Context-window lookup (
kiro/streaming_core.py):calculate_tokens_from_context_usage()now normalizes the client's model name before the cache lookup.claude-sonnet-4-6,claude-sonnet-4-6[1m]) missed the cache and fell back to 200K.Normalization (
kiro/model_resolver.py): the no-minor-version pattern now strips-latestthe same way the minor-version pattern already does (claude-opus-5-latest→claude-opus-5).claude-opus-5-5→claude-opus-5.5).Docs: added a paid-tier model note and a Sonnet 4 end-of-life note, and removed the Sonnet 4 entry, in all 8 READMEs.
Live verification (Builder ID account,
runtime.us-east-1.kiro.dev)GET /v1/models: 21 entries (was 13).POST /v1/chat/completions(non-streaming): HTTP 200 for every listed model.claude-sonnet-4returns 400Invalid model ID, which confirms the end of life./v1/messages:claude-opus-5-5,claude-sonnet-5-latest,claude-sonnet-5-5[1m]andclaude-opus-4-8all return 200.Reported prompt tokens for the same ~10.5K-token prompt:
claude-haiku-4.5(200K, control)claude-sonnet-4.6(1M)claude-sonnet-4-6via/v1/messagesclaude-sonnet-4-6[1m]via/v1/messagesTests
a5292cahas 1691.tokenLimitsstructure (rejectsbool) and the per-model context window values./v1/modelslist with default aliases.-latestpositive cases, plus negative cases (-latest-20260724,-latestx, 7- and 9-digit suffixes, trailing dash, non-Claude names).Known issues (not changed here)
metadataEventcontaining"stopReason":"CONTENT_FILTERED"and refusal categoryREASONING_EXTRACTION.reasoning_effort: "none"does not help, because the thinking system-prompt addition is still injected.FAKE_REASONING=falsefixes it (Opus 5 then answers normally).auto-kiroalias is listed but not resolved when the Kiro payload is built, so Kiro rejects it (autoworks). This predates this PR and is covered by fix(model_resolver): resolve MODEL_ALIASES in get_model_id_for_kiro #184 and fix: aliases not resolved when building Kiro API payload #198.Related