mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-28 08:52:45 +00:00
fix: honor minimax api host during provider discovery
This commit is contained in:
@@ -80,7 +80,7 @@ function resolveApiCatalog(ctx: ProviderCatalogContext) {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
provider: {
|
provider: {
|
||||||
...buildMinimaxProvider(),
|
...buildMinimaxProvider(ctx.env),
|
||||||
apiKey,
|
apiKey,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -105,7 +105,7 @@ function resolvePortalCatalog(ctx: ProviderCatalogContext) {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
provider: buildPortalProviderCatalog({
|
provider: buildPortalProviderCatalog({
|
||||||
baseUrl: explicitBaseUrl || buildMinimaxPortalProvider().baseUrl,
|
baseUrl: explicitBaseUrl || buildMinimaxPortalProvider(ctx.env).baseUrl,
|
||||||
apiKey,
|
apiKey,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -67,18 +67,18 @@ function buildMinimaxCatalog(): ModelDefinitionConfig[] {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildMinimaxProvider(): ModelProviderConfig {
|
export function buildMinimaxProvider(env?: NodeJS.ProcessEnv): ModelProviderConfig {
|
||||||
return {
|
return {
|
||||||
baseUrl: resolveMinimaxCatalogBaseUrl(),
|
baseUrl: resolveMinimaxCatalogBaseUrl(env),
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
authHeader: true,
|
authHeader: true,
|
||||||
models: buildMinimaxCatalog(),
|
models: buildMinimaxCatalog(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildMinimaxPortalProvider(): ModelProviderConfig {
|
export function buildMinimaxPortalProvider(env?: NodeJS.ProcessEnv): ModelProviderConfig {
|
||||||
return {
|
return {
|
||||||
baseUrl: resolveMinimaxCatalogBaseUrl(),
|
baseUrl: resolveMinimaxCatalogBaseUrl(env),
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
authHeader: true,
|
authHeader: true,
|
||||||
models: buildMinimaxCatalog(),
|
models: buildMinimaxCatalog(),
|
||||||
|
|||||||
Reference in New Issue
Block a user