mirror of
http://10.0.2.1:3031/sauer/claude-code.git
synced 2026-06-30 08:56:58 +10:00
add LOCAL_MODEL_BASE_URL for local model proxy support (ollama, litellm)
This commit is contained in:
parent
b48c66b480
commit
8605b3e54a
@ -303,11 +303,14 @@ export async function getAnthropicClient({
|
||||
authToken: isClaudeAISubscriber()
|
||||
? getClaudeAIOAuthTokens()?.accessToken
|
||||
: undefined,
|
||||
// Set baseURL from OAuth config when using staging OAuth
|
||||
...(process.env.USER_TYPE === 'ant' &&
|
||||
isEnvTruthy(process.env.USE_STAGING_OAUTH)
|
||||
? { baseURL: getOauthConfig().BASE_API_URL }
|
||||
: {}),
|
||||
// Set baseURL: LOCAL_MODEL_BASE_URL for local model proxies (litellm/ollama),
|
||||
// staging OAuth override, or fall through to SDK's ANTHROPIC_BASE_URL default
|
||||
...(process.env.LOCAL_MODEL_BASE_URL
|
||||
? { baseURL: process.env.LOCAL_MODEL_BASE_URL }
|
||||
: process.env.USER_TYPE === 'ant' &&
|
||||
isEnvTruthy(process.env.USE_STAGING_OAUTH)
|
||||
? { baseURL: getOauthConfig().BASE_API_URL }
|
||||
: {}),
|
||||
...ARGS,
|
||||
...(isDebugToStdErr() && { logger: createStderrLogger() }),
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user