feat: add ANTHROPIC_HOST configuration for Anthropic in cli and UI (#1776)
This commit is contained in:
@@ -5,6 +5,7 @@ import { default_key_value, required_keys } from '../models/hardcoded_stuff'; //
|
||||
export function isSecretKey(keyName: string): boolean {
|
||||
// Endpoints and hosts should not be stored as secrets
|
||||
const nonSecretKeys = [
|
||||
'ANTHROPIC_HOST',
|
||||
'DATABRICKS_HOST',
|
||||
'OLLAMA_HOST',
|
||||
'OPENAI_HOST',
|
||||
|
||||
@@ -58,7 +58,7 @@ export const short_list = ['gpt-4o', 'claude-3-5-sonnet-latest'];
|
||||
|
||||
export const required_keys = {
|
||||
OpenAI: ['OPENAI_API_KEY', 'OPENAI_HOST', 'OPENAI_BASE_PATH'],
|
||||
Anthropic: ['ANTHROPIC_API_KEY'],
|
||||
Anthropic: ['ANTHROPIC_API_KEY', 'ANTHROPIC_HOST'],
|
||||
Databricks: ['DATABRICKS_HOST'],
|
||||
Groq: ['GROQ_API_KEY'],
|
||||
Ollama: ['OLLAMA_HOST'],
|
||||
@@ -75,6 +75,7 @@ export const required_keys = {
|
||||
};
|
||||
|
||||
export const default_key_value = {
|
||||
ANTHROPIC_HOST: 'https://api.anthropic.com',
|
||||
OPENAI_HOST: 'https://api.openai.com',
|
||||
OPENAI_BASE_PATH: 'v1/chat/completions',
|
||||
OLLAMA_HOST: 'localhost',
|
||||
|
||||
@@ -91,6 +91,11 @@ export const PROVIDER_REGISTRY: ProviderRegistry[] = [
|
||||
name: 'ANTHROPIC_API_KEY',
|
||||
is_secret: true,
|
||||
},
|
||||
{
|
||||
name: 'ANTHROPIC_HOST',
|
||||
is_secret: false,
|
||||
default: 'https://api.anthropic.com',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user