From 59247b52cf18ecc5f947cdd9a8926ad43c431a26 Mon Sep 17 00:00:00 2001 From: Riccardo Giorato Date: Sun, 25 Jan 2026 20:47:27 +0100 Subject: [PATCH] Add Together AI provider with API key auth and model support --- docs/providers/index.md | 1 + docs/providers/together.md | 62 ++++++++++++++++++++++++++++++++++++++ src/agents/model-auth.ts | 1 + 3 files changed, 64 insertions(+) create mode 100644 docs/providers/together.md diff --git a/docs/providers/index.md b/docs/providers/index.md index c4f020192..0bc1f4ae3 100644 --- a/docs/providers/index.md +++ b/docs/providers/index.md @@ -38,6 +38,7 @@ See [Venice AI](/providers/venice). - [Qwen (OAuth)](/providers/qwen) - [OpenRouter](/providers/openrouter) - [Vercel AI Gateway](/providers/vercel-ai-gateway) +- [Together AI](/providers/together) - [Moonshot AI (Kimi + Kimi Code)](/providers/moonshot) - [OpenCode Zen](/providers/opencode) - [Amazon Bedrock](/bedrock) diff --git a/docs/providers/together.md b/docs/providers/together.md new file mode 100644 index 000000000..abf8b4631 --- /dev/null +++ b/docs/providers/together.md @@ -0,0 +1,62 @@ +--- +summary: "Together AI setup (auth + model selection)" +read_when: + - You want to use Together AI with Clawdbot + - You need the API key env var or CLI auth choice +--- +# Together AI + + +The [Together AI](https://together.ai) provides access to leading open-source models including Llama, DeepSeek, Qwen, and more through a unified API. + +- Provider: `together` +- Auth: `TOGETHER_API_KEY` +- API: OpenAI-compatible + +## Quick start + +1) Set the API key (recommended: store it for the Gateway): + +```bash +clawdbot onboard --auth-choice together-api-key +``` + +2) Set a default model: + +```json5 +{ + agents: { + defaults: { + model: { primary: "together/meta-llama/Llama-3.3-70B-Instruct-Turbo" } + } + } +} +``` + +## Non-interactive example + +```bash +clawdbot onboard --non-interactive \ + --mode local \ + --auth-choice together-api-key \ + --together-api-key "$TOGETHER_API_KEY" +``` + +## Environment note + +If the Gateway runs as a daemon (launchd/systemd), make sure `TOGETHER_API_KEY` +is available to that process (for example, in `~/.clawdbot/.env` or via +`env.shellEnv`). + +## Available models + +Together AI provides access to many popular open-source models: + +- **Llama 3.3 70B Instruct Turbo** - Fast, efficient instruction following +- **Llama 4 Scout** - Vision model with image understanding +- **Llama 4 Maverick** - Advanced vision and reasoning +- **DeepSeek V3.1** - Powerful coding and reasoning model +- **DeepSeek R1** - Advanced reasoning model +- **Qwen 2.5 72B** - Multilingual capabilities + +All models support standard chat completions and are OpenAI API compatible. \ No newline at end of file diff --git a/src/agents/model-auth.ts b/src/agents/model-auth.ts index 680d0f53c..da3cd31c7 100644 --- a/src/agents/model-auth.ts +++ b/src/agents/model-auth.ts @@ -285,6 +285,7 @@ export function resolveEnvApiKey(provider: string): EnvApiKeyResult | null { venice: "VENICE_API_KEY", mistral: "MISTRAL_API_KEY", opencode: "OPENCODE_API_KEY", + together: "TOGETHER_API_KEY", }; const envVar = envMap[normalized]; if (!envVar) return null;