From 08e8fddf73a04ccabece8258a1aad6cc56b0f7b8 Mon Sep 17 00:00:00 2001 From: Zhi Yang <196515526+FakerL@users.noreply.github.com> Date: Mon, 5 Jan 2026 07:21:23 +0000 Subject: [PATCH] feat(kiro): add OAuth model name mappings support for Kiro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Kiro to the list of supported channels for OAuth model name mappings, allowing users to map Kiro model IDs (e.g., kiro-claude-opus-4-5) to canonical model names (e.g., claude-opus-4-5-20251101). The Kiro case is implemented as a separate switch block to keep it isolated from upstream CLIProxyAPI providers, making future merges from the upstream repository cleaner. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- config.example.yaml | 5 ++++- sdk/cliproxy/auth/model_name_mappings.go | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config.example.yaml b/config.example.yaml index f6f84c6e..19e8e129 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -215,7 +215,7 @@ ws-auth: false # Global OAuth model name mappings (per channel) # These mappings rename model IDs for both model listing and request routing. -# Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow. +# Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow, kiro. # NOTE: Mappings do not apply to gemini-api-key, codex-api-key, claude-api-key, openai-compatibility, vertex-api-key, or ampcode. # oauth-model-mappings: # gemini-cli: @@ -243,6 +243,9 @@ ws-auth: false # iflow: # - name: "glm-4.7" # alias: "glm-god" +# kiro: +# - name: "kiro-claude-opus-4-5" +# alias: "op45" # OAuth provider excluded models # oauth-excluded-models: diff --git a/sdk/cliproxy/auth/model_name_mappings.go b/sdk/cliproxy/auth/model_name_mappings.go index 03380c09..d4200671 100644 --- a/sdk/cliproxy/auth/model_name_mappings.go +++ b/sdk/cliproxy/auth/model_name_mappings.go @@ -165,6 +165,8 @@ func OAuthModelMappingChannel(provider, authKind string) string { return "codex" case "gemini-cli", "aistudio", "antigravity", "qwen", "iflow": return provider + case "kiro": + return provider default: return "" }