changed api openai api key
This commit is contained in:
+8
-4
@@ -10,10 +10,14 @@ PUBLIC_BASE_URL=http://localhost:4000
|
||||
# --- LLM providers & failover ---
|
||||
# Ordered chain of `provider:model`, tried left to right. If the first provider
|
||||
# is rate-limited, out of quota, or down, the next takes over mid-turn.
|
||||
# Providers: gmi | openrouter (both OpenAI-compatible)
|
||||
LLM_CHAIN_SUPERVISOR=gmi:MiniMaxAI/MiniMax-M3,openrouter:nvidia/nemotron-3-ultra-550b-a55b:free
|
||||
LLM_CHAIN_AGENT=gmi:MiniMaxAI/MiniMax-M3,openrouter:nvidia/nemotron-3-ultra-550b-a55b:free
|
||||
LLM_DEFAULT_PROVIDER=gmi
|
||||
# Providers: openai | gmi | openrouter (all OpenAI-compatible)
|
||||
LLM_CHAIN_SUPERVISOR=openai:gpt-4o-mini
|
||||
LLM_CHAIN_AGENT=openai:gpt-4o-mini
|
||||
LLM_DEFAULT_PROVIDER=openai
|
||||
|
||||
# OpenAI
|
||||
OPENAI_API_KEY=
|
||||
OPENAI_BASE_URL=https://api.openai.com/v1
|
||||
|
||||
# GMI Cloud — free MiniMax allocation (MiniMaxAI/MiniMax-M3, MiniMaxAI/MiniMax-M2.7)
|
||||
GMI_API_KEY=
|
||||
|
||||
+7
-3
@@ -18,13 +18,17 @@ const config = {
|
||||
|
||||
llm: {
|
||||
// Ordered failover chain of `provider:model` specs, tried left to right.
|
||||
supervisorChain: list(process.env.LLM_CHAIN_SUPERVISOR, ['gmi:MiniMaxAI/MiniMax-M3']),
|
||||
agentChain: list(process.env.LLM_CHAIN_AGENT, ['gmi:MiniMaxAI/MiniMax-M3']),
|
||||
supervisorChain: list(process.env.LLM_CHAIN_SUPERVISOR, ['openai:gpt-4o-mini']),
|
||||
agentChain: list(process.env.LLM_CHAIN_AGENT, ['openai:gpt-4o-mini']),
|
||||
|
||||
// Every provider is OpenAI-compatible; they differ only by base URL + key.
|
||||
// A provider with no key is skipped when a chain references it.
|
||||
defaultProvider: process.env.LLM_DEFAULT_PROVIDER || 'gmi',
|
||||
defaultProvider: process.env.LLM_DEFAULT_PROVIDER || 'openai',
|
||||
providers: {
|
||||
openai: {
|
||||
apiKey: process.env.OPENAI_API_KEY,
|
||||
baseUrl: process.env.OPENAI_BASE_URL || 'https://api.openai.com/v1',
|
||||
},
|
||||
gmi: {
|
||||
apiKey: process.env.GMI_API_KEY,
|
||||
baseUrl: process.env.GMI_BASE_URL || 'https://api.gmi-serving.com/v1',
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ app.use((err, _req, res, _next) => {
|
||||
async function start() {
|
||||
const configured = Object.entries(config.llm.providers).filter(([, p]) => p.apiKey).map(([n]) => n);
|
||||
if (!configured.length) {
|
||||
logger.error('No provider API key set (GMI_API_KEY / OPENROUTER_API_KEY) — the assistant cannot run. Add one to .env.');
|
||||
logger.error('No provider API key set (OPENAI_API_KEY / GMI_API_KEY / OPENROUTER_API_KEY) — the assistant cannot run. Add one to .env.');
|
||||
process.exit(1);
|
||||
}
|
||||
logger.info(` providers : ${configured.join(', ')}`);
|
||||
|
||||
Reference in New Issue
Block a user