jeopi-catalog 16.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +523 -0
- package/README.md +43 -0
- package/dist/types/build.d.ts +3 -0
- package/dist/types/compat/anthropic.d.ts +11 -0
- package/dist/types/compat/apply.d.ts +7 -0
- package/dist/types/compat/devin.d.ts +9 -0
- package/dist/types/compat/openai.d.ts +28 -0
- package/dist/types/discovery/antigravity.d.ts +70 -0
- package/dist/types/discovery/codex.d.ts +38 -0
- package/dist/types/discovery/cursor-gen/agent_pb.d.ts +13022 -0
- package/dist/types/discovery/cursor.d.ts +23 -0
- package/dist/types/discovery/devin-gen/buf/validate/validate_pb.d.ts +1715 -0
- package/dist/types/discovery/devin-gen/exa/analytics_pb/analytics_pb.d.ts +693 -0
- package/dist/types/discovery/devin-gen/exa/api_server_pb/api_server_pb.d.ts +9158 -0
- package/dist/types/discovery/devin-gen/exa/auth_pb/auth_pb.d.ts +52 -0
- package/dist/types/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.d.ts +276 -0
- package/dist/types/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.d.ts +78 -0
- package/dist/types/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.d.ts +999 -0
- package/dist/types/discovery/devin-gen/exa/chat_pb/chat_pb.d.ts +1704 -0
- package/dist/types/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.d.ts +656 -0
- package/dist/types/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.d.ts +15014 -0
- package/dist/types/discovery/devin-gen/exa/context_module_pb/context_module_pb.d.ts +607 -0
- package/dist/types/discovery/devin-gen/exa/cortex_pb/cortex_pb.d.ts +11830 -0
- package/dist/types/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.d.ts +248 -0
- package/dist/types/discovery/devin-gen/exa/index_pb/index_pb.d.ts +1747 -0
- package/dist/types/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.d.ts +509 -0
- package/dist/types/discovery/devin-gen/exa/language_server_pb/language_server_pb.d.ts +9048 -0
- package/dist/types/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.d.ts +1760 -0
- package/dist/types/discovery/devin-gen/exa/prompt_pb/prompt_pb.d.ts +286 -0
- package/dist/types/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.d.ts +405 -0
- package/dist/types/discovery/devin-gen/exa/trust_pb/trust_pb.d.ts +582 -0
- package/dist/types/discovery/devin.d.ts +24 -0
- package/dist/types/discovery/gemini.d.ts +25 -0
- package/dist/types/discovery/gitlab-duo-workflow.d.ts +30 -0
- package/dist/types/discovery/index.d.ts +5 -0
- package/dist/types/discovery/openai-compatible.d.ts +74 -0
- package/dist/types/effort.d.ts +9 -0
- package/dist/types/fireworks-model-id.d.ts +23 -0
- package/dist/types/hosts.d.ts +137 -0
- package/dist/types/identity/bundled.d.ts +3 -0
- package/dist/types/identity/classify.d.ts +69 -0
- package/dist/types/identity/dialect.d.ts +3 -0
- package/dist/types/identity/family.d.ts +139 -0
- package/dist/types/identity/id.d.ts +12 -0
- package/dist/types/identity/index.d.ts +8 -0
- package/dist/types/identity/markers.d.ts +4 -0
- package/dist/types/identity/priority.d.ts +1 -0
- package/dist/types/identity/reference.d.ts +23 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/model-cache.d.ts +17 -0
- package/dist/types/model-manager.d.ts +68 -0
- package/dist/types/model-thinking.d.ts +79 -0
- package/dist/types/models.d.ts +12 -0
- package/dist/types/provider-models/bundled-references.d.ts +11 -0
- package/dist/types/provider-models/descriptor-types.d.ts +74 -0
- package/dist/types/provider-models/descriptors.d.ts +427 -0
- package/dist/types/provider-models/google.d.ts +27 -0
- package/dist/types/provider-models/index.d.ts +6 -0
- package/dist/types/provider-models/ollama.d.ts +9 -0
- package/dist/types/provider-models/openai-compat.d.ts +450 -0
- package/dist/types/provider-models/special.d.ts +33 -0
- package/dist/types/types.d.ts +656 -0
- package/dist/types/utils.d.ts +20 -0
- package/dist/types/variant-collapse.d.ts +133 -0
- package/dist/types/wire/codex.d.ts +26 -0
- package/dist/types/wire/coreweave.d.ts +12 -0
- package/dist/types/wire/gemini-headers.d.ts +37 -0
- package/dist/types/wire/github-copilot.d.ts +45 -0
- package/package.json +101 -0
- package/src/build.ts +47 -0
- package/src/compat/anthropic.ts +93 -0
- package/src/compat/apply.ts +15 -0
- package/src/compat/devin.ts +12 -0
- package/src/compat/openai.ts +689 -0
- package/src/discovery/antigravity.ts +253 -0
- package/src/discovery/codex.ts +371 -0
- package/src/discovery/cursor-gen/agent_pb.ts +15274 -0
- package/src/discovery/cursor.ts +314 -0
- package/src/discovery/devin-gen/buf/validate/validate_pb.ts +1862 -0
- package/src/discovery/devin-gen/exa/analytics_pb/analytics_pb.ts +871 -0
- package/src/discovery/devin-gen/exa/api_server_pb/api_server_pb.ts +11083 -0
- package/src/discovery/devin-gen/exa/auth_pb/auth_pb.ts +71 -0
- package/src/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.ts +348 -0
- package/src/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.ts +103 -0
- package/src/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.ts +1198 -0
- package/src/discovery/devin-gen/exa/chat_pb/chat_pb.ts +2063 -0
- package/src/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.ts +810 -0
- package/src/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.ts +18354 -0
- package/src/discovery/devin-gen/exa/context_module_pb/context_module_pb.ts +732 -0
- package/src/discovery/devin-gen/exa/cortex_pb/cortex_pb.ts +14277 -0
- package/src/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.ts +312 -0
- package/src/discovery/devin-gen/exa/index_pb/index_pb.ts +2106 -0
- package/src/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.ts +623 -0
- package/src/discovery/devin-gen/exa/language_server_pb/language_server_pb.ts +10918 -0
- package/src/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.ts +2125 -0
- package/src/discovery/devin-gen/exa/prompt_pb/prompt_pb.ts +361 -0
- package/src/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.ts +450 -0
- package/src/discovery/devin-gen/exa/trust_pb/trust_pb.ts +712 -0
- package/src/discovery/devin.ts +151 -0
- package/src/discovery/gemini.ts +260 -0
- package/src/discovery/gitlab-duo-workflow.ts +855 -0
- package/src/discovery/index.ts +5 -0
- package/src/discovery/openai-compatible.ts +249 -0
- package/src/effort.ts +16 -0
- package/src/fireworks-model-id.ts +50 -0
- package/src/hosts.ts +129 -0
- package/src/identity/bundled.ts +28 -0
- package/src/identity/classify.ts +214 -0
- package/src/identity/dialect.ts +42 -0
- package/src/identity/family.ts +296 -0
- package/src/identity/id.ts +81 -0
- package/src/identity/index.ts +8 -0
- package/src/identity/markers.ts +49 -0
- package/src/identity/priority.ts +57 -0
- package/src/identity/reference.ts +148 -0
- package/src/index.ts +17 -0
- package/src/model-cache.ts +171 -0
- package/src/model-manager.ts +520 -0
- package/src/model-thinking.ts +760 -0
- package/src/models.json +88898 -0
- package/src/models.json.d.ts +9 -0
- package/src/models.ts +64 -0
- package/src/provider-models/bundled-references.ts +58 -0
- package/src/provider-models/descriptor-types.ts +79 -0
- package/src/provider-models/descriptors.ts +503 -0
- package/src/provider-models/google.ts +107 -0
- package/src/provider-models/index.ts +6 -0
- package/src/provider-models/ollama.ts +172 -0
- package/src/provider-models/openai-compat.ts +4283 -0
- package/src/provider-models/special.ts +159 -0
- package/src/types.ts +786 -0
- package/src/utils.ts +69 -0
- package/src/variant-collapse.ts +1065 -0
- package/src/wire/codex.ts +43 -0
- package/src/wire/coreweave.ts +51 -0
- package/src/wire/gemini-headers.ts +74 -0
- package/src/wire/github-copilot.ts +121 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The provider catalog table: one entry per chat-model provider, carrying the
|
|
3
|
+
* catalog half of what used to live in `jeopi-ai`'s registry definitions
|
|
4
|
+
* (default model, runtime model-manager factory, discovery wiring). The auth
|
|
5
|
+
* half (env keys, OAuth login/refresh) stays in the pi-ai registry, which
|
|
6
|
+
* type-checks itself against `KnownProvider` from this table.
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelManagerConfig, ProviderCatalogEntry, ProviderDescriptor } from "./descriptor-types";
|
|
9
|
+
import { googleModelManagerOptions, googleVertexModelManagerOptions } from "./google";
|
|
10
|
+
import { ollamaCloudModelManagerOptions } from "./ollama";
|
|
11
|
+
import {
|
|
12
|
+
aimlApiModelManagerOptions,
|
|
13
|
+
alibabaCodingPlanModelManagerOptions,
|
|
14
|
+
anthropicModelManagerOptions,
|
|
15
|
+
cerebrasModelManagerOptions,
|
|
16
|
+
cloudflareAiGatewayModelManagerOptions,
|
|
17
|
+
coreWeaveModelManagerOptions,
|
|
18
|
+
deepseekModelManagerOptions,
|
|
19
|
+
firepassModelManagerOptions,
|
|
20
|
+
fireworksModelManagerOptions,
|
|
21
|
+
githubCopilotModelManagerOptions,
|
|
22
|
+
groqModelManagerOptions,
|
|
23
|
+
huggingfaceModelManagerOptions,
|
|
24
|
+
kiloModelManagerOptions,
|
|
25
|
+
kimiCodeModelManagerOptions,
|
|
26
|
+
litellmModelManagerOptions,
|
|
27
|
+
lmStudioModelManagerOptions,
|
|
28
|
+
mistralModelManagerOptions,
|
|
29
|
+
moonshotModelManagerOptions,
|
|
30
|
+
nanoGptModelManagerOptions,
|
|
31
|
+
nvidiaModelManagerOptions,
|
|
32
|
+
ollamaModelManagerOptions,
|
|
33
|
+
openaiModelManagerOptions,
|
|
34
|
+
opencodeGoModelManagerOptions,
|
|
35
|
+
opencodeZenModelManagerOptions,
|
|
36
|
+
openrouterModelManagerOptions,
|
|
37
|
+
qianfanModelManagerOptions,
|
|
38
|
+
qwenPortalModelManagerOptions,
|
|
39
|
+
sakanaModelManagerOptions,
|
|
40
|
+
syntheticModelManagerOptions,
|
|
41
|
+
togetherModelManagerOptions,
|
|
42
|
+
umansModelManagerOptions,
|
|
43
|
+
veniceModelManagerOptions,
|
|
44
|
+
vercelAiGatewayModelManagerOptions,
|
|
45
|
+
vllmModelManagerOptions,
|
|
46
|
+
waferServerlessModelManagerOptions,
|
|
47
|
+
xaiModelManagerOptions,
|
|
48
|
+
xaiOAuthModelManagerOptions,
|
|
49
|
+
xiaomiModelManagerOptions,
|
|
50
|
+
zenmuxModelManagerOptions,
|
|
51
|
+
zhipuCodingPlanModelManagerOptions,
|
|
52
|
+
} from "./openai-compat";
|
|
53
|
+
import {
|
|
54
|
+
cursorModelManagerOptions,
|
|
55
|
+
devinModelManagerOptions,
|
|
56
|
+
gitLabDuoWorkflowModelManagerOptions,
|
|
57
|
+
zaiModelManagerOptions,
|
|
58
|
+
} from "./special";
|
|
59
|
+
|
|
60
|
+
export const CATALOG_PROVIDERS = [
|
|
61
|
+
{
|
|
62
|
+
id: "aimlapi",
|
|
63
|
+
defaultModel: "gpt-5.5-2026-04-23",
|
|
64
|
+
envVars: ["AIMLAPI_API_KEY"],
|
|
65
|
+
createModelManagerOptions: (config: ModelManagerConfig) => aimlApiModelManagerOptions(config),
|
|
66
|
+
dynamicModelsAuthoritative: true,
|
|
67
|
+
catalogDiscovery: { label: "AIML API" },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "alibaba-coding-plan",
|
|
71
|
+
defaultModel: "qwen3.7-plus",
|
|
72
|
+
envVars: ["ALIBABA_CODING_PLAN_API_KEY"],
|
|
73
|
+
createModelManagerOptions: (config: ModelManagerConfig) => alibabaCodingPlanModelManagerOptions(config),
|
|
74
|
+
catalogDiscovery: { label: "Alibaba Coding Plan" },
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "amazon-bedrock",
|
|
78
|
+
defaultModel: "us.anthropic.claude-opus-4-8",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "anthropic",
|
|
82
|
+
defaultModel: "claude-opus-4-8",
|
|
83
|
+
envVars: ["ANTHROPIC_API_KEY"],
|
|
84
|
+
createModelManagerOptions: (config: ModelManagerConfig) => anthropicModelManagerOptions(config),
|
|
85
|
+
catalogDiscovery: { label: "Anthropic" },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "azure",
|
|
89
|
+
defaultModel: "gpt-5.5",
|
|
90
|
+
envVars: ["AZURE_OPENAI_API_KEY"],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "cerebras",
|
|
94
|
+
defaultModel: "zai-glm-4.7",
|
|
95
|
+
envVars: ["CEREBRAS_API_KEY"],
|
|
96
|
+
createModelManagerOptions: (config: ModelManagerConfig) => cerebrasModelManagerOptions(config),
|
|
97
|
+
catalogDiscovery: { label: "Cerebras" },
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "cloudflare-ai-gateway",
|
|
101
|
+
defaultModel: "anthropic/claude-opus-4-8",
|
|
102
|
+
envVars: ["CLOUDFLARE_AI_GATEWAY_API_KEY"],
|
|
103
|
+
createModelManagerOptions: (config: ModelManagerConfig) => cloudflareAiGatewayModelManagerOptions(config),
|
|
104
|
+
catalogDiscovery: { label: "Cloudflare AI Gateway" },
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "cursor",
|
|
108
|
+
defaultModel: "claude-4.6-opus-high",
|
|
109
|
+
envVars: ["CURSOR_ACCESS_TOKEN"],
|
|
110
|
+
createModelManagerOptions: (config: ModelManagerConfig) => cursorModelManagerOptions(config),
|
|
111
|
+
catalogDiscovery: { label: "Cursor", envVars: ["CURSOR_API_KEY"], oauthProvider: "cursor" },
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "deepseek",
|
|
115
|
+
defaultModel: "deepseek-v4-pro",
|
|
116
|
+
envVars: ["DEEPSEEK_API_KEY"],
|
|
117
|
+
createModelManagerOptions: (config: ModelManagerConfig) => deepseekModelManagerOptions(config),
|
|
118
|
+
catalogDiscovery: { label: "DeepSeek" },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "devin",
|
|
122
|
+
defaultModel: "swe-1-6",
|
|
123
|
+
envVars: ["DEVIN_API_KEY"],
|
|
124
|
+
createModelManagerOptions: (config: ModelManagerConfig) => devinModelManagerOptions(config),
|
|
125
|
+
dynamicModelsAuthoritative: true,
|
|
126
|
+
catalogDiscovery: { label: "Devin", envVars: ["DEVIN_API_KEY"], oauthProvider: "devin" },
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "firepass",
|
|
130
|
+
defaultModel: "kimi-k2.6-turbo",
|
|
131
|
+
envVars: ["FIREPASS_API_KEY"],
|
|
132
|
+
createModelManagerOptions: (config: ModelManagerConfig) => firepassModelManagerOptions(config),
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "fireworks",
|
|
136
|
+
defaultModel: "kimi-k2.7-code",
|
|
137
|
+
envVars: ["FIREWORKS_API_KEY"],
|
|
138
|
+
createModelManagerOptions: (config: ModelManagerConfig) => fireworksModelManagerOptions(config),
|
|
139
|
+
catalogDiscovery: { label: "Fireworks" },
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "github-copilot",
|
|
143
|
+
defaultModel: "gpt-5.5",
|
|
144
|
+
envVars: ["COPILOT_GITHUB_TOKEN"],
|
|
145
|
+
createModelManagerOptions: (config: ModelManagerConfig) => githubCopilotModelManagerOptions(config),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "gitlab-duo",
|
|
149
|
+
defaultModel: "duo-chat-opus-4-6",
|
|
150
|
+
envVars: ["GITLAB_TOKEN"],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "gitlab-duo-agent",
|
|
154
|
+
defaultModel: "claude_sonnet_4_6_vertex",
|
|
155
|
+
envVars: ["GITLAB_TOKEN"],
|
|
156
|
+
createModelManagerOptions: (config: ModelManagerConfig) => gitLabDuoWorkflowModelManagerOptions(config),
|
|
157
|
+
dynamicModelsAuthoritative: true,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "google",
|
|
161
|
+
defaultModel: "gemini-3.1-pro-preview",
|
|
162
|
+
envVars: ["GEMINI_API_KEY"],
|
|
163
|
+
createModelManagerOptions: (config: ModelManagerConfig) => googleModelManagerOptions(config),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: "google-antigravity",
|
|
167
|
+
defaultModel: "gemini-3.1-pro",
|
|
168
|
+
specialModelManager: true,
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: "google-gemini-cli",
|
|
172
|
+
defaultModel: "gemini-3.1-pro-preview",
|
|
173
|
+
specialModelManager: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: "google-vertex",
|
|
177
|
+
defaultModel: "gemini-3.1-pro-preview",
|
|
178
|
+
createModelManagerOptions: (config: ModelManagerConfig) => googleVertexModelManagerOptions(config),
|
|
179
|
+
allowUnauthenticated: true,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: "groq",
|
|
183
|
+
defaultModel: "openai/gpt-oss-120b",
|
|
184
|
+
envVars: ["GROQ_API_KEY"],
|
|
185
|
+
createModelManagerOptions: (config: ModelManagerConfig) => groqModelManagerOptions(config),
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "huggingface",
|
|
189
|
+
defaultModel: "deepseek-ai/DeepSeek-R1",
|
|
190
|
+
envVars: ["HUGGINGFACE_HUB_TOKEN", "HF_TOKEN"],
|
|
191
|
+
createModelManagerOptions: (config: ModelManagerConfig) => huggingfaceModelManagerOptions(config),
|
|
192
|
+
catalogDiscovery: { label: "Hugging Face" },
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: "kilo",
|
|
196
|
+
defaultModel: "anthropic/claude-opus-4.8",
|
|
197
|
+
envVars: ["KILO_API_KEY"],
|
|
198
|
+
createModelManagerOptions: (config: ModelManagerConfig) => kiloModelManagerOptions(config),
|
|
199
|
+
catalogDiscovery: { label: "Kilo Gateway", allowUnauthenticated: true },
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: "kimi-code",
|
|
203
|
+
defaultModel: "kimi-for-coding",
|
|
204
|
+
createModelManagerOptions: (config: ModelManagerConfig) => kimiCodeModelManagerOptions(config),
|
|
205
|
+
catalogDiscovery: { label: "Kimi Code", envVars: ["KIMI_API_KEY"] },
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "litellm",
|
|
209
|
+
defaultModel: "claude-opus-4-8",
|
|
210
|
+
envVars: ["LITELLM_API_KEY"],
|
|
211
|
+
createModelManagerOptions: (config: ModelManagerConfig) => litellmModelManagerOptions(config),
|
|
212
|
+
catalogDiscovery: { label: "LiteLLM", allowUnauthenticated: true },
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: "lm-studio",
|
|
216
|
+
defaultModel: "llama-3-8b",
|
|
217
|
+
envVars: ["LM_STUDIO_API_KEY"],
|
|
218
|
+
createModelManagerOptions: (config: ModelManagerConfig) => lmStudioModelManagerOptions(config),
|
|
219
|
+
allowUnauthenticated: true,
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: "minimax",
|
|
223
|
+
defaultModel: "MiniMax-M3",
|
|
224
|
+
envVars: ["MINIMAX_API_KEY"],
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: "minimax-code",
|
|
228
|
+
defaultModel: "MiniMax-M3",
|
|
229
|
+
envVars: ["MINIMAX_CODE_API_KEY"],
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
id: "minimax-code-cn",
|
|
233
|
+
defaultModel: "MiniMax-M3",
|
|
234
|
+
envVars: ["MINIMAX_CODE_CN_API_KEY"],
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: "mistral",
|
|
238
|
+
defaultModel: "devstral-medium-latest",
|
|
239
|
+
envVars: ["MISTRAL_API_KEY"],
|
|
240
|
+
createModelManagerOptions: (config: ModelManagerConfig) => mistralModelManagerOptions(config),
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: "moonshot",
|
|
244
|
+
defaultModel: "kimi-k2.7-code",
|
|
245
|
+
// KIMI_API_KEY is the most intuitive name for a Kimi/Moonshot key; accept it
|
|
246
|
+
// as a fallback so China users need not learn MOONSHOT_API_KEY. (#2883)
|
|
247
|
+
envVars: ["MOONSHOT_API_KEY", "KIMI_API_KEY"],
|
|
248
|
+
createModelManagerOptions: (config: ModelManagerConfig) => moonshotModelManagerOptions(config),
|
|
249
|
+
catalogDiscovery: { label: "Moonshot" },
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: "nanogpt",
|
|
253
|
+
defaultModel: "openai/gpt-5.5",
|
|
254
|
+
envVars: ["NANO_GPT_API_KEY"],
|
|
255
|
+
createModelManagerOptions: (config: ModelManagerConfig) => nanoGptModelManagerOptions(config),
|
|
256
|
+
catalogDiscovery: { label: "NanoGPT" },
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: "nvidia",
|
|
260
|
+
defaultModel: "nvidia/llama-3.1-nemotron-70b-instruct",
|
|
261
|
+
envVars: ["NVIDIA_API_KEY"],
|
|
262
|
+
createModelManagerOptions: (config: ModelManagerConfig) => nvidiaModelManagerOptions(config),
|
|
263
|
+
catalogDiscovery: { label: "NVIDIA" },
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
id: "ollama",
|
|
267
|
+
defaultModel: "gpt-oss:20b",
|
|
268
|
+
envVars: ["OLLAMA_API_KEY"],
|
|
269
|
+
createModelManagerOptions: (config: ModelManagerConfig) => ollamaModelManagerOptions(config),
|
|
270
|
+
allowUnauthenticated: true,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: "ollama-cloud",
|
|
274
|
+
defaultModel: "gpt-oss:120b",
|
|
275
|
+
envVars: ["OLLAMA_CLOUD_API_KEY"],
|
|
276
|
+
createModelManagerOptions: (config: ModelManagerConfig) => ollamaCloudModelManagerOptions(config),
|
|
277
|
+
catalogDiscovery: { label: "Ollama Cloud", oauthProvider: "ollama-cloud" },
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: "openai",
|
|
281
|
+
defaultModel: "gpt-5.5",
|
|
282
|
+
envVars: ["OPENAI_API_KEY"],
|
|
283
|
+
createModelManagerOptions: (config: ModelManagerConfig) => openaiModelManagerOptions(config),
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: "openai-codex",
|
|
287
|
+
defaultModel: "gpt-5.5",
|
|
288
|
+
envVars: ["OPENAI_CODEX_OAUTH_TOKEN"],
|
|
289
|
+
specialModelManager: true,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "opencode-go",
|
|
293
|
+
defaultModel: "kimi-k2.7-code",
|
|
294
|
+
envVars: ["OPENCODE_API_KEY"],
|
|
295
|
+
createModelManagerOptions: (config: ModelManagerConfig) => opencodeGoModelManagerOptions(config),
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "opencode-zen",
|
|
299
|
+
defaultModel: "claude-opus-4-8",
|
|
300
|
+
envVars: ["OPENCODE_API_KEY"],
|
|
301
|
+
createModelManagerOptions: (config: ModelManagerConfig) => opencodeZenModelManagerOptions(config),
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: "openrouter",
|
|
305
|
+
defaultModel: "openai/gpt-5.5",
|
|
306
|
+
envVars: ["OPENROUTER_API_KEY"],
|
|
307
|
+
createModelManagerOptions: (config: ModelManagerConfig) => openrouterModelManagerOptions(config),
|
|
308
|
+
catalogDiscovery: { label: "OpenRouter", allowUnauthenticated: true },
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: "qianfan",
|
|
312
|
+
defaultModel: "deepseek-v3.2",
|
|
313
|
+
envVars: ["QIANFAN_API_KEY"],
|
|
314
|
+
createModelManagerOptions: (config: ModelManagerConfig) => qianfanModelManagerOptions(config),
|
|
315
|
+
catalogDiscovery: { label: "Qianfan" },
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
id: "qwen-portal",
|
|
319
|
+
defaultModel: "coder-model",
|
|
320
|
+
envVars: ["QWEN_OAUTH_TOKEN", "QWEN_PORTAL_API_KEY"],
|
|
321
|
+
createModelManagerOptions: (config: ModelManagerConfig) => qwenPortalModelManagerOptions(config),
|
|
322
|
+
catalogDiscovery: {
|
|
323
|
+
label: "Qwen Portal",
|
|
324
|
+
oauthProvider: "qwen-portal",
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: "sakana",
|
|
329
|
+
defaultModel: "fugu",
|
|
330
|
+
envVars: ["SAKANA_API_KEY", "FUGU_API_KEY"],
|
|
331
|
+
createModelManagerOptions: (config: ModelManagerConfig) => sakanaModelManagerOptions(config),
|
|
332
|
+
dynamicModelsAuthoritative: true,
|
|
333
|
+
catalogDiscovery: { label: "Sakana AI" },
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
id: "synthetic",
|
|
337
|
+
defaultModel: "hf:zai-org/GLM-5.1",
|
|
338
|
+
envVars: ["SYNTHETIC_API_KEY"],
|
|
339
|
+
createModelManagerOptions: (config: ModelManagerConfig) => syntheticModelManagerOptions(config),
|
|
340
|
+
dynamicModelsAuthoritative: true,
|
|
341
|
+
catalogDiscovery: { label: "Synthetic" },
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: "together",
|
|
345
|
+
defaultModel: "moonshotai/Kimi-K2.7-Code",
|
|
346
|
+
envVars: ["TOGETHER_API_KEY"],
|
|
347
|
+
createModelManagerOptions: (config: ModelManagerConfig) => togetherModelManagerOptions(config),
|
|
348
|
+
catalogDiscovery: { label: "Together" },
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: "umans",
|
|
352
|
+
defaultModel: "umans-coder",
|
|
353
|
+
envVars: ["UMANS_AI_CODING_PLAN_API_KEY"],
|
|
354
|
+
createModelManagerOptions: (config: ModelManagerConfig) => umansModelManagerOptions(config),
|
|
355
|
+
dynamicModelsAuthoritative: true,
|
|
356
|
+
catalogDiscovery: { label: "Umans AI Coding Plan", allowUnauthenticated: true },
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: "venice",
|
|
360
|
+
defaultModel: "llama-3.3-70b",
|
|
361
|
+
envVars: ["VENICE_API_KEY"],
|
|
362
|
+
createModelManagerOptions: (config: ModelManagerConfig) => veniceModelManagerOptions(config),
|
|
363
|
+
catalogDiscovery: { label: "Venice", allowUnauthenticated: true },
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: "vercel-ai-gateway",
|
|
367
|
+
defaultModel: "anthropic/claude-opus-4.8",
|
|
368
|
+
envVars: ["AI_GATEWAY_API_KEY"],
|
|
369
|
+
createModelManagerOptions: (config: ModelManagerConfig) => vercelAiGatewayModelManagerOptions(config),
|
|
370
|
+
catalogDiscovery: {
|
|
371
|
+
label: "Vercel AI Gateway",
|
|
372
|
+
envVars: ["VERCEL_AI_GATEWAY_API_KEY"],
|
|
373
|
+
allowUnauthenticated: true,
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
id: "vllm",
|
|
378
|
+
defaultModel: "gpt-oss-20b",
|
|
379
|
+
envVars: ["VLLM_API_KEY"],
|
|
380
|
+
createModelManagerOptions: (config: ModelManagerConfig) => vllmModelManagerOptions(config),
|
|
381
|
+
catalogDiscovery: { label: "vLLM", allowUnauthenticated: true },
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
id: "wafer-serverless",
|
|
385
|
+
defaultModel: "GLM-5.1",
|
|
386
|
+
envVars: ["WAFER_SERVERLESS_API_KEY"],
|
|
387
|
+
createModelManagerOptions: (config: ModelManagerConfig) => waferServerlessModelManagerOptions(config),
|
|
388
|
+
catalogDiscovery: {
|
|
389
|
+
label: "Wafer Serverless",
|
|
390
|
+
oauthProvider: "wafer-serverless",
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
id: "coreweave",
|
|
395
|
+
defaultModel: "openai/gpt-oss-120b",
|
|
396
|
+
envVars: ["COREWEAVE_API_KEY", "WANDB_API_KEY"],
|
|
397
|
+
createModelManagerOptions: (config: ModelManagerConfig) => coreWeaveModelManagerOptions(config),
|
|
398
|
+
catalogDiscovery: { label: "CoreWeave Serverless Inference" },
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: "xai",
|
|
402
|
+
defaultModel: "grok-4-fast-non-reasoning",
|
|
403
|
+
envVars: ["XAI_API_KEY"],
|
|
404
|
+
createModelManagerOptions: (config: ModelManagerConfig) => xaiModelManagerOptions(config),
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: "xai-oauth",
|
|
408
|
+
defaultModel: "grok-4.3",
|
|
409
|
+
envVars: ["XAI_OAUTH_TOKEN", "XAI_API_KEY"],
|
|
410
|
+
createModelManagerOptions: (config: ModelManagerConfig) => xaiOAuthModelManagerOptions(config),
|
|
411
|
+
catalogDiscovery: {
|
|
412
|
+
label: "xAI Grok OAuth (SuperGrok)",
|
|
413
|
+
oauthProvider: "xai-oauth",
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
id: "xiaomi",
|
|
418
|
+
defaultModel: "mimo-v2.5",
|
|
419
|
+
envVars: ["XIAOMI_API_KEY"],
|
|
420
|
+
createModelManagerOptions: (config: ModelManagerConfig) => xiaomiModelManagerOptions(config),
|
|
421
|
+
catalogDiscovery: { label: "Xiaomi" },
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
id: "xiaomi-token-plan-ams",
|
|
425
|
+
defaultModel: "mimo-v2.5",
|
|
426
|
+
envVars: ["XIAOMI_TOKEN_PLAN_AMS_API_KEY"],
|
|
427
|
+
createModelManagerOptions: (config: ModelManagerConfig) =>
|
|
428
|
+
xiaomiModelManagerOptions({ ...config, providerId: "xiaomi-token-plan-ams", tokenPlanRegion: "ams" }),
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
id: "xiaomi-token-plan-cn",
|
|
432
|
+
defaultModel: "mimo-v2.5",
|
|
433
|
+
envVars: ["XIAOMI_TOKEN_PLAN_CN_API_KEY"],
|
|
434
|
+
createModelManagerOptions: (config: ModelManagerConfig) =>
|
|
435
|
+
xiaomiModelManagerOptions({ ...config, providerId: "xiaomi-token-plan-cn", tokenPlanRegion: "cn" }),
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
id: "xiaomi-token-plan-sgp",
|
|
439
|
+
defaultModel: "mimo-v2.5",
|
|
440
|
+
envVars: ["XIAOMI_TOKEN_PLAN_SGP_API_KEY"],
|
|
441
|
+
createModelManagerOptions: (config: ModelManagerConfig) =>
|
|
442
|
+
xiaomiModelManagerOptions({ ...config, providerId: "xiaomi-token-plan-sgp", tokenPlanRegion: "sgp" }),
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: "zai",
|
|
446
|
+
defaultModel: "glm-5.2",
|
|
447
|
+
envVars: ["ZAI_API_KEY"],
|
|
448
|
+
createModelManagerOptions: (config: ModelManagerConfig) => zaiModelManagerOptions(config),
|
|
449
|
+
catalogDiscovery: { label: "zAI" },
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: "zenmux",
|
|
453
|
+
defaultModel: "anthropic/claude-opus-4.8",
|
|
454
|
+
envVars: ["ZENMUX_API_KEY"],
|
|
455
|
+
createModelManagerOptions: (config: ModelManagerConfig) => zenmuxModelManagerOptions(config),
|
|
456
|
+
catalogDiscovery: { label: "ZenMux" },
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: "zhipu-coding-plan",
|
|
460
|
+
defaultModel: "glm-5.2",
|
|
461
|
+
envVars: ["ZHIPU_API_KEY"],
|
|
462
|
+
createModelManagerOptions: (config: ModelManagerConfig) => zhipuCodingPlanModelManagerOptions(config),
|
|
463
|
+
catalogDiscovery: { label: "Zhipu Coding Plan" },
|
|
464
|
+
},
|
|
465
|
+
] as const satisfies readonly ProviderCatalogEntry[];
|
|
466
|
+
|
|
467
|
+
/** Chat-model providers — every entry in the catalog table. */
|
|
468
|
+
export type KnownProvider = (typeof CATALOG_PROVIDERS)[number]["id"];
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Runtime model-discovery descriptors: every catalog provider that exposes a
|
|
472
|
+
* standard model-manager factory. Special-managed providers
|
|
473
|
+
* (`google-antigravity`/`google-gemini-cli`/`openai-codex`) are built bespoke in
|
|
474
|
+
* the coding-agent runtime and are excluded here.
|
|
475
|
+
*/
|
|
476
|
+
const CATALOG_ENTRY_LIST: readonly ProviderCatalogEntry[] = CATALOG_PROVIDERS;
|
|
477
|
+
|
|
478
|
+
export const PROVIDER_DESCRIPTORS: readonly ProviderDescriptor[] = CATALOG_ENTRY_LIST.flatMap(provider => {
|
|
479
|
+
if (!provider.createModelManagerOptions || provider.specialModelManager) {
|
|
480
|
+
return [];
|
|
481
|
+
}
|
|
482
|
+
return [
|
|
483
|
+
{
|
|
484
|
+
providerId: provider.id,
|
|
485
|
+
defaultModel: provider.defaultModel,
|
|
486
|
+
createModelManagerOptions: provider.createModelManagerOptions,
|
|
487
|
+
allowUnauthenticated: provider.allowUnauthenticated,
|
|
488
|
+
dynamicModelsAuthoritative: provider.dynamicModelsAuthoritative,
|
|
489
|
+
catalogDiscovery: provider.catalogDiscovery
|
|
490
|
+
? { ...provider.catalogDiscovery, envVars: provider.catalogDiscovery.envVars ?? provider.envVars ?? [] }
|
|
491
|
+
: undefined,
|
|
492
|
+
},
|
|
493
|
+
];
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
/** Default model IDs for all known providers, derived from the catalog table. */
|
|
497
|
+
export const DEFAULT_MODEL_PER_PROVIDER: Record<KnownProvider, string> = Object.fromEntries(
|
|
498
|
+
CATALOG_PROVIDERS.map(provider => [provider.id, provider.defaultModel] as [string, string]),
|
|
499
|
+
) as Record<KnownProvider, string>;
|
|
500
|
+
|
|
501
|
+
export function getCatalogProviderEntry(id: string): ProviderCatalogEntry | undefined {
|
|
502
|
+
return CATALOG_PROVIDERS.find(provider => provider.id === id);
|
|
503
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { fetchAntigravityDiscoveryModels } from "../discovery/antigravity";
|
|
2
|
+
import { fetchGeminiModels } from "../discovery/gemini";
|
|
3
|
+
import type { ModelManagerOptions } from "../model-manager";
|
|
4
|
+
import type { FetchImpl } from "../types";
|
|
5
|
+
import { GEMINI_CLI_VARIANT_COLLAPSE_TABLE } from "../variant-collapse";
|
|
6
|
+
|
|
7
|
+
export interface GoogleModelManagerConfig {
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
fetch?: FetchImpl;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface GoogleVertexModelManagerConfig {
|
|
13
|
+
apiKey?: string;
|
|
14
|
+
project?: string;
|
|
15
|
+
location?: string;
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
fetch?: FetchImpl;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface GoogleAntigravityModelManagerConfig {
|
|
21
|
+
oauthToken?: string;
|
|
22
|
+
endpoint?: string;
|
|
23
|
+
fetch?: FetchImpl;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GoogleGeminiCliModelManagerConfig {
|
|
27
|
+
oauthToken?: string;
|
|
28
|
+
endpoint?: string;
|
|
29
|
+
fetch?: FetchImpl;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const CLOUD_CODE_ASSIST_ENDPOINT = "https://cloudcode-pa.googleapis.com";
|
|
33
|
+
|
|
34
|
+
function toDiscoveryFetch(fetchImpl: FetchImpl | undefined): typeof fetch | undefined {
|
|
35
|
+
if (!fetchImpl) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return Object.assign(
|
|
39
|
+
(input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]) => fetchImpl(input, init),
|
|
40
|
+
{ preconnect: fetchImpl.preconnect ?? fetch.preconnect },
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function googleModelManagerOptions(
|
|
45
|
+
config?: GoogleModelManagerConfig,
|
|
46
|
+
): ModelManagerOptions<"google-generative-ai"> {
|
|
47
|
+
const apiKey = config?.apiKey;
|
|
48
|
+
return {
|
|
49
|
+
providerId: "google",
|
|
50
|
+
...(apiKey
|
|
51
|
+
? { fetchDynamicModels: () => fetchGeminiModels({ apiKey, fetch: toDiscoveryFetch(config?.fetch) }) }
|
|
52
|
+
: undefined),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function googleVertexModelManagerOptions(_config?: GoogleVertexModelManagerConfig): ModelManagerOptions {
|
|
57
|
+
return { providerId: "google-vertex" };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function googleAntigravityModelManagerOptions(
|
|
61
|
+
config?: GoogleAntigravityModelManagerConfig,
|
|
62
|
+
): ModelManagerOptions<"google-gemini-cli"> {
|
|
63
|
+
const token = config?.oauthToken;
|
|
64
|
+
return {
|
|
65
|
+
providerId: "google-antigravity",
|
|
66
|
+
...(token
|
|
67
|
+
? {
|
|
68
|
+
fetchDynamicModels: () =>
|
|
69
|
+
fetchAntigravityDiscoveryModels({
|
|
70
|
+
token,
|
|
71
|
+
endpoint: config?.endpoint,
|
|
72
|
+
fetcher: toDiscoveryFetch(config?.fetch),
|
|
73
|
+
}),
|
|
74
|
+
}
|
|
75
|
+
: undefined),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function googleGeminiCliModelManagerOptions(
|
|
80
|
+
config?: GoogleGeminiCliModelManagerConfig,
|
|
81
|
+
): ModelManagerOptions<"google-gemini-cli"> {
|
|
82
|
+
const token = config?.oauthToken;
|
|
83
|
+
const endpoint = config?.endpoint ?? CLOUD_CODE_ASSIST_ENDPOINT;
|
|
84
|
+
return {
|
|
85
|
+
providerId: "google-gemini-cli",
|
|
86
|
+
...(token
|
|
87
|
+
? {
|
|
88
|
+
fetchDynamicModels: async () => {
|
|
89
|
+
const models = await fetchAntigravityDiscoveryModels({
|
|
90
|
+
token,
|
|
91
|
+
endpoint,
|
|
92
|
+
fetcher: toDiscoveryFetch(config?.fetch),
|
|
93
|
+
collapseTable: GEMINI_CLI_VARIANT_COLLAPSE_TABLE,
|
|
94
|
+
});
|
|
95
|
+
if (models === null) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return models.map(m => ({
|
|
99
|
+
...m,
|
|
100
|
+
provider: "google-gemini-cli" as const,
|
|
101
|
+
baseUrl: endpoint,
|
|
102
|
+
}));
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
: undefined),
|
|
106
|
+
};
|
|
107
|
+
}
|