mirror of
https://github.com/githubhjs/CLIProxyAPIPlus.git
synced 2026-07-12 01:25:13 +00:00
feat(config): add github-copilot to oauth-model-mappings supported channels
This commit is contained in:
+4
-1
@@ -215,7 +215,7 @@ ws-auth: false
|
|||||||
|
|
||||||
# Global OAuth model name mappings (per channel)
|
# Global OAuth model name mappings (per channel)
|
||||||
# These mappings rename model IDs for both model listing and request routing.
|
# These mappings rename model IDs for both model listing and request routing.
|
||||||
# Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow, kiro.
|
# Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow, kiro, github-copilot.
|
||||||
# NOTE: Mappings do not apply to gemini-api-key, codex-api-key, claude-api-key, openai-compatibility, vertex-api-key, or ampcode.
|
# 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:
|
# oauth-model-mappings:
|
||||||
# gemini-cli:
|
# gemini-cli:
|
||||||
@@ -246,6 +246,9 @@ ws-auth: false
|
|||||||
# kiro:
|
# kiro:
|
||||||
# - name: "kiro-claude-opus-4-5"
|
# - name: "kiro-claude-opus-4-5"
|
||||||
# alias: "op45"
|
# alias: "op45"
|
||||||
|
# github-copilot:
|
||||||
|
# - name: "gpt-5"
|
||||||
|
# alias: "copilot-gpt5"
|
||||||
|
|
||||||
# OAuth provider excluded models
|
# OAuth provider excluded models
|
||||||
# oauth-excluded-models:
|
# oauth-excluded-models:
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ type Config struct {
|
|||||||
|
|
||||||
// OAuthModelMappings defines global model name mappings for OAuth/file-backed auth channels.
|
// OAuthModelMappings defines global model name mappings for OAuth/file-backed auth channels.
|
||||||
// These mappings affect both model listing and model routing for supported channels:
|
// These mappings affect both model listing and model routing for supported channels:
|
||||||
// gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow.
|
// gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow, kiro, github-copilot.
|
||||||
//
|
//
|
||||||
// NOTE: This does not apply to existing per-credential model alias features under:
|
// NOTE: This does not apply to existing per-credential model alias features under:
|
||||||
// gemini-api-key, codex-api-key, claude-api-key, openai-compatibility, vertex-api-key, and ampcode.
|
// gemini-api-key, codex-api-key, claude-api-key, openai-compatibility, vertex-api-key, and ampcode.
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ func modelMappingChannel(auth *Auth) string {
|
|||||||
// and auth kind. Returns empty string if the provider/authKind combination doesn't support
|
// and auth kind. Returns empty string if the provider/authKind combination doesn't support
|
||||||
// OAuth model mappings (e.g., API key authentication).
|
// OAuth model mappings (e.g., API key authentication).
|
||||||
//
|
//
|
||||||
// Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow.
|
// Supported channels: gemini-cli, vertex, aistudio, antigravity, claude, codex, qwen, iflow, kiro, github-copilot.
|
||||||
func OAuthModelMappingChannel(provider, authKind string) string {
|
func OAuthModelMappingChannel(provider, authKind string) string {
|
||||||
provider = strings.ToLower(strings.TrimSpace(provider))
|
provider = strings.ToLower(strings.TrimSpace(provider))
|
||||||
authKind = strings.ToLower(strings.TrimSpace(authKind))
|
authKind = strings.ToLower(strings.TrimSpace(authKind))
|
||||||
@@ -165,7 +165,7 @@ func OAuthModelMappingChannel(provider, authKind string) string {
|
|||||||
return "codex"
|
return "codex"
|
||||||
case "gemini-cli", "aistudio", "antigravity", "qwen", "iflow":
|
case "gemini-cli", "aistudio", "antigravity", "qwen", "iflow":
|
||||||
return provider
|
return provider
|
||||||
case "kiro":
|
case "kiro", "github-copilot":
|
||||||
return provider
|
return provider
|
||||||
default:
|
default:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user