MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getBuiltinProviderConfig

Function getBuiltinProviderConfig

src/utils/model/providerConfig.ts:163–222  ·  view source on GitHub ↗
(id: BuiltinProviderId)

Source from the content-addressed store, hash-verified

161}
162
163function getBuiltinProviderConfig(id: BuiltinProviderId): ActiveProviderConfig {
164 if (id === 'bedrock') {
165 return {
166 id,
167 type: 'bedrock',
168 name: BUILTIN_PROVIDER_NAMES.bedrock,
169 region: getAWSRegion(),
170 isCustom: false,
171 }
172 }
173
174 if (id === 'vertex') {
175 return {
176 id,
177 type: 'vertex',
178 name: BUILTIN_PROVIDER_NAMES.vertex,
179 baseURL: process.env.ANTHROPIC_VERTEX_BASE_URL,
180 region: getDefaultVertexRegion(),
181 projectId: process.env.ANTHROPIC_VERTEX_PROJECT_ID,
182 isCustom: false,
183 }
184 }
185
186 if (id === 'foundry') {
187 return {
188 id,
189 type: 'foundry',
190 name: BUILTIN_PROVIDER_NAMES.foundry,
191 baseURL: process.env.ANTHROPIC_FOUNDRY_BASE_URL,
192 apiKeyEnv: 'ANTHROPIC_FOUNDRY_API_KEY',
193 resource: process.env.ANTHROPIC_FOUNDRY_RESOURCE,
194 isCustom: false,
195 }
196 }
197
198 if (id === 'github-models' || id === 'github-copilot') {
199 const config = BUILTIN_PROVIDER_CONFIGS[id]
200 return {
201 id,
202 name: BUILTIN_PROVIDER_NAMES[id],
203 ...config,
204 ...(id === 'github-copilot'
205 ? {
206 baseURL: getGitHubCopilotApiUrl() ?? config.baseURL,
207 }
208 : {}),
209 isCustom: false,
210 }
211 }
212
213 return {
214 id,
215 type: 'firstParty',
216 name: BUILTIN_PROVIDER_NAMES.firstParty,
217 baseURL: process.env.ANTHROPIC_BASE_URL,
218 apiKeyEnv: 'ANTHROPIC_API_KEY',
219 authTokenEnv: 'ANTHROPIC_AUTH_TOKEN',
220 isCustom: false,

Callers 2

getProviderConfigByIdFunction · 0.85
getActiveProviderConfigFunction · 0.85

Calls 3

getAWSRegionFunction · 0.85
getDefaultVertexRegionFunction · 0.85
getGitHubCopilotApiUrlFunction · 0.85

Tested by

no test coverage detected