feat: adding support for Together ai provider (#10304)

This commit is contained in:
Riccardo Giorato
2026-02-10 00:49:34 +01:00
committed by GitHub
parent ffeed212dc
commit 661279cbfa
16 changed files with 466 additions and 9 deletions

View File

@@ -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" ||