Skip to content

Commit 23314e5

Browse files
committed
fix(sdk): rename together_ai provider to togetherai across stack
1 parent 987ada0 commit 23314e5

11 files changed

Lines changed: 19 additions & 17 deletions

File tree

api/oss/src/core/secrets/dtos.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ def validate_secret_data_based_on_kind(cls, values: Dict[str, Any]):
7272
values["data"] = data
7373

7474
if kind == SecretKind.PROVIDER_KEY.value:
75+
# Fix inconsistent API naming - normalize 'together_ai' to 'togetherai'
76+
if data.get("kind", "") == "together_ai":
77+
data["kind"] = "togetherai"
78+
7579
if not isinstance(data, dict):
7680
raise ValueError(
7781
"The provided request secret dto is not a valid type for StandardProviderDTO"
@@ -86,10 +90,9 @@ def validate_secret_data_based_on_kind(cls, values: Dict[str, Any]):
8690
)
8791

8892
elif kind == SecretKind.CUSTOM_PROVIDER.value:
89-
# Fix inconsistent API naming - Users might enter 'togetherai' but the API requires 'together_ai'
90-
# This ensures compatibility with LiteLLM which requires the provider in "together_ai" format
91-
if data.get("kind", "") == "togetherai":
92-
data["kind"] = "together_ai"
93+
# Fix inconsistent API naming - normalize 'together_ai' to 'togetherai'
94+
if data.get("kind", "") == "together_ai":
95+
data["kind"] = "togetherai"
9396

9497
if not isinstance(data, dict):
9598
raise ValueError(

api/oss/src/core/secrets/enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class StandardProviderKind(str, Enum):
1818
MISTRALAI = "mistralai"
1919
ANTHROPIC = "anthropic"
2020
PERPLEXITYAI = "perplexityai"
21-
TOGETHERAI = "together_ai"
21+
TOGETHERAI = "togetherai"
2222
OPENROUTER = "openrouter"
2323
GEMINI = "gemini"
2424

@@ -39,6 +39,6 @@ class CustomProviderKind(str, Enum):
3939
MISTRALAI = "mistralai"
4040
ANTHROPIC = "anthropic"
4141
PERPLEXITYAI = "perplexityai"
42-
TOGETHERAI = "together_ai"
42+
TOGETHERAI = "togetherai"
4343
OPENROUTER = "openrouter"
4444
GEMINI = "gemini"

sdk/agenta/client/backend/types/custom_provider_kind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"mistralai",
2020
"anthropic",
2121
"perplexityai",
22-
"together_ai",
22+
"togetherai",
2323
"openrouter",
2424
"gemini",
2525
],

sdk/agenta/client/backend/types/standard_provider_kind.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"mistralai",
1515
"anthropic",
1616
"perplexityai",
17-
"together_ai",
17+
"togetherai",
1818
"openrouter",
1919
"gemini",
2020
],

sdk/agenta/sdk/assets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"perplexity/sonar-reasoning",
170170
"perplexity/sonar-reasoning-pro",
171171
],
172-
"together_ai": [
172+
"togetherai": [
173173
"together_ai/deepseek-ai/DeepSeek-R1",
174174
"together_ai/deepseek-ai/DeepSeek-R1-Distill-Llama-70B",
175175
"together_ai/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",

sdk/agenta/sdk/workflows/runners/daytona.py

100644100755
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ def _get_provider_env_vars(self) -> Dict[str, str]:
131131
"mistralai": "MISTRALAI_API_KEY",
132132
"anthropic": "ANTHROPIC_API_KEY",
133133
"perplexityai": "PERPLEXITYAI_API_KEY",
134-
# Secret kind is "together_ai" (underscore) even though the env var is TOGETHERAI_API_KEY
135-
"together_ai": "TOGETHERAI_API_KEY",
134+
"togetherai": "TOGETHERAI_API_KEY",
136135
"openrouter": "OPENROUTER_API_KEY",
137136
"gemini": "GEMINI_API_KEY",
138137
}

web/oss/src/components/SelectLLMProvider/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const PROVIDER_ICON_MAP: Record<string, string> = {
4444
deepinfra: "DeepInfra",
4545
openrouter: "OpenRouter",
4646
perplexityai: "Perplexity AI",
47-
together_ai: "Together AI",
47+
togetherai: "Together AI",
4848
vertex_ai: "Google Vertex AI",
4949
bedrock: "AWS Bedrock",
5050
azure: "Azure OpenAI",

web/oss/src/lib/Types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export enum SecretDTOProvider {
451451
MISTRALAI = "mistralai",
452452
ANTHROPIC = "anthropic",
453453
PERPLEXITYAI = "perplexityai",
454-
TOGETHERAI = "together_ai",
454+
TOGETHERAI = "togetherai",
455455
OPENROUTER = "openrouter",
456456
GEMINI = "gemini",
457457
}
@@ -467,7 +467,7 @@ export const PROVIDER_LABELS: Record<string, string> = {
467467
mistralai: "Mistral AI",
468468
anthropic: "Anthropic",
469469
perplexityai: "Perplexity AI",
470-
together_ai: "Together AI",
470+
togetherai: "Together AI",
471471
openrouter: "OpenRouter",
472472
gemini: "Google Gemini",
473473
vertex_ai: "Google Vertex AI",

web/oss/src/lib/helpers/llmProviders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const transformSecret = (secrets: CustomSecretDTO[] | StandardSecretDTO[]
4444
mistralai: "MISTRALAI_API_KEY",
4545
anthropic: "ANTHROPIC_API_KEY",
4646
perplexityai: "PERPLEXITYAI_API_KEY",
47-
together_ai: "TOGETHERAI_API_KEY",
47+
togetherai: "TOGETHERAI_API_KEY",
4848
openrouter: "OPENROUTER_API_KEY",
4949
gemini: "GEMINI_API_KEY",
5050
}

web/packages/agenta-ui/src/SelectLLMProvider/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ if (Icon) return <Icon className="w-4 h-4" />
160160
Get the display name for a provider key.
161161
162162
```typescript
163-
getProviderDisplayName('together_ai') // "Together AI"
163+
getProviderDisplayName('togetherai') // "Together AI"
164164
```
165165

166166
#### `PROVIDER_ICON_MAP`

0 commit comments

Comments
 (0)