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
+12 -2
View File
@@ -22,7 +22,9 @@ const runtime = {
}),
};
vi.mock("./plugin-registry.js", () => ({ ensurePluginRegistryLoaded: () => undefined }));
vi.mock("./plugin-registry.js", () => ({
ensurePluginRegistryLoaded: () => undefined,
}));
vi.mock("../commands/message.js", () => ({ messageCommand }));
vi.mock("../commands/status.js", () => ({ statusCommand }));
@@ -42,7 +44,9 @@ vi.mock("../commands/configure.js", () => ({
}));
vi.mock("../commands/setup.js", () => ({ setupCommand }));
vi.mock("../commands/onboard.js", () => ({ onboardCommand }));
vi.mock("../commands/doctor-config-flow.js", () => ({ loadAndMaybeMigrateDoctorConfig }));
vi.mock("../commands/doctor-config-flow.js", () => ({
loadAndMaybeMigrateDoctorConfig,
}));
vi.mock("../runtime.js", () => ({ defaultRuntime: runtime }));
vi.mock("./channel-auth.js", () => ({ runChannelLogin, runChannelLogout }));
vi.mock("../tui/tui.js", () => ({ runTui }));
@@ -174,6 +178,12 @@ describe("cli program (smoke)", () => {
key: "sk-moonshot-test",
field: "moonshotApiKey",
},
{
authChoice: "together-api-key",
flag: "--together-api-key",
key: "sk-together-test",
field: "togetherApiKey",
},
{
authChoice: "moonshot-api-key-cn",
flag: "--moonshot-api-key",
+3 -1
View File
@@ -58,7 +58,7 @@ export function registerOnboardCommand(program: Command) {
.option("--mode <mode>", "Wizard mode: local|remote")
.option(
"--auth-choice <choice>",
"Auth: setup-token|token|chutes|openai-codex|openai-api-key|xai-api-key|qianfan-api-key|openrouter-api-key|ai-gateway-api-key|cloudflare-ai-gateway-api-key|moonshot-api-key|moonshot-api-key-cn|kimi-code-api-key|synthetic-api-key|venice-api-key|gemini-api-key|zai-api-key|xiaomi-api-key|apiKey|minimax-api|minimax-api-lightning|opencode-zen|skip",
"Auth: setup-token|token|chutes|openai-codex|openai-api-key|xai-api-key|qianfan-api-key|openrouter-api-key|ai-gateway-api-key|cloudflare-ai-gateway-api-key|moonshot-api-key|moonshot-api-key-cn|kimi-code-api-key|synthetic-api-key|venice-api-key|gemini-api-key|zai-api-key|xiaomi-api-key|apiKey|minimax-api|minimax-api-lightning|opencode-zen|skip|together-api-key",
)
.option(
"--token-provider <id>",
@@ -85,6 +85,7 @@ export function registerOnboardCommand(program: Command) {
.option("--minimax-api-key <key>", "MiniMax API key")
.option("--synthetic-api-key <key>", "Synthetic API key")
.option("--venice-api-key <key>", "Venice API key")
.option("--together-api-key <key>", "Together AI API key")
.option("--opencode-zen-api-key <key>", "OpenCode Zen API key")
.option("--xai-api-key <key>", "xAI API key")
.option("--qianfan-api-key <key>", "QIANFAN API key")
@@ -142,6 +143,7 @@ export function registerOnboardCommand(program: Command) {
minimaxApiKey: opts.minimaxApiKey as string | undefined,
syntheticApiKey: opts.syntheticApiKey as string | undefined,
veniceApiKey: opts.veniceApiKey as string | undefined,
togetherApiKey: opts.togetherApiKey as string | undefined,
opencodeZenApiKey: opts.opencodeZenApiKey as string | undefined,
xaiApiKey: opts.xaiApiKey as string | undefined,
gatewayPort: