mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 02:28:27 +00:00
feat: adding support for Together ai provider (#10304)
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
applyOpenrouterConfig,
|
||||
applySyntheticConfig,
|
||||
applyVeniceConfig,
|
||||
applyTogetherConfig,
|
||||
applyVercelAiGatewayConfig,
|
||||
applyXaiConfig,
|
||||
applyXiaomiConfig,
|
||||
@@ -38,6 +39,7 @@ import {
|
||||
setSyntheticApiKey,
|
||||
setXaiApiKey,
|
||||
setVeniceApiKey,
|
||||
setTogetherApiKey,
|
||||
setVercelAiGatewayApiKey,
|
||||
setXiaomiApiKey,
|
||||
setZaiApiKey,
|
||||
@@ -544,6 +546,29 @@ export async function applyNonInteractiveAuthChoice(params: {
|
||||
return applyOpencodeZenConfig(nextConfig);
|
||||
}
|
||||
|
||||
if (authChoice === "together-api-key") {
|
||||
const resolved = await resolveNonInteractiveApiKey({
|
||||
provider: "together",
|
||||
cfg: baseConfig,
|
||||
flagValue: opts.togetherApiKey,
|
||||
flagName: "--together-api-key",
|
||||
envVar: "TOGETHER_API_KEY",
|
||||
runtime,
|
||||
});
|
||||
if (!resolved) {
|
||||
return null;
|
||||
}
|
||||
if (resolved.source !== "profile") {
|
||||
await setTogetherApiKey(resolved.key);
|
||||
}
|
||||
nextConfig = applyAuthProfileConfig(nextConfig, {
|
||||
profileId: "together:default",
|
||||
provider: "together",
|
||||
mode: "api_key",
|
||||
});
|
||||
return applyTogetherConfig(nextConfig);
|
||||
}
|
||||
|
||||
if (
|
||||
authChoice === "oauth" ||
|
||||
authChoice === "chutes" ||
|
||||
|
||||
Reference in New Issue
Block a user