refactor(config): rename model-name-mappings to oauth-model-mappings

This commit is contained in:
hkfires
2025-12-30 10:14:27 +08:00
parent f6ab6d97b9
commit 7be3f1c36c
7 changed files with 85 additions and 102 deletions

View File

@@ -156,9 +156,9 @@ ws-auth: false
# headers:
# X-Custom-Header: "custom-value"
# models: # optional: map aliases to upstream model names
# - name: "gemini-2.0-flash" # upstream model name
# - name: "gemini-2.5-flash" # upstream model name
# alias: "vertex-flash" # client-visible alias
# - name: "gemini-1.5-pro"
# - name: "gemini-2.5-pro"
# alias: "vertex-pro"
# Amp Integration
@@ -188,38 +188,42 @@ ws-auth: false
# # Useful when Amp CLI requests models you don't have access to (e.g., Claude Opus 4.5)
# # but you have a similar model available (e.g., Claude Sonnet 4).
# model-mappings:
# - from: "claude-opus-4.5" # Model requested by Amp CLI
# to: "claude-sonnet-4" # Route to this available model instead
# - from: "gpt-5"
# to: "gemini-2.5-pro"
# - from: "claude-3-opus-20240229"
# to: "claude-3-5-sonnet-20241022"
# - from: "claude-opus-4-5-20251101" # Model requested by Amp CLI
# to: "gemini-claude-opus-4-5-thinking" # Route to this available model instead
# - from: "claude-sonnet-4-5-20250929"
# to: "gemini-claude-sonnet-4-5-thinking"
# - from: "claude-haiku-4-5-20251001"
# to: "gemini-2.5-flash"
# Global model name mappings (per channel)
# Global OAuth model name mappings (per channel)
# These mappings rename model IDs for both model listing and request routing.
# NOTE: Mappings do not apply to codex-api-key, claude-api-key, openai-compatibility, vertex-api-key, or ampcode.
# model-name-mappings:
# gemini:
# Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow.
# 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:
# - from: "gemini-2.5-pro" # original model name under this channel
# to: "gpt-5" # client-visible alias
# apikey-gemini:
# - from: "gemini-2.5-pro"
# to: "gpt-5"
# claude:
# - from: "claude-sonnet-4"
# to: "gpt-4o"
# vertex:
# - from: "gemini-2.5-pro"
# to: "gpt-5"
# qwen:
# - from: "qwen3-coder-plus"
# to: "gpt-4o-mini"
# iflow:
# - from: "glm-4.7"
# to: "gpt-5.1-mini"
# aistudio:
# - from: "gemini-2.5-pro"
# to: "gpt-5"
# antigravity:
# - from: "gemini-3-pro-preview"
# to: "gpt-5"
# claude:
# - from: "claude-sonnet-4-5-20250929"
# to: "gpt-5"
# codex:
# - from: "gpt-5"
# to: "gemini-2.5-pro"
# qwen:
# - from: "qwen3-coder-plus"
# to: "gpt-5"
# iflow:
# - from: "glm-4.7"
# to: "gpt-5"
# OAuth provider excluded models
# oauth-excluded-models: