Skip to content

Commit c933d80

Browse files
feat(provider): add AdaL (SylphAI) as a built-in provider
Add AdaL CLI by SylphAI as a new provider option in ForgeCode. AdaL is registered as an OpenAI-compatible provider with api.sylph.ai endpoints, enabling ForgeCode users to access AdaL's models via API key auth. Changes: - Add 'adal' entry to provider.json with OpenAI response type - Add ProviderId::ADAL constant to forge_domain - Wire up display_name ("AdaL"), FromStr, and built_in_providers() Co-Authored-By: ForgeCode <noreply@forgecode.dev>
1 parent 58d0df9 commit c933d80

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

crates/forge_domain/src/provider.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ impl ProviderId {
7373
pub const FIREWORKS_AI: ProviderId = ProviderId(Cow::Borrowed("fireworks-ai"));
7474
pub const NOVITA: ProviderId = ProviderId(Cow::Borrowed("novita"));
7575
pub const GOOGLE_AI_STUDIO: ProviderId = ProviderId(Cow::Borrowed("google_ai_studio"));
76+
pub const ADAL: ProviderId = ProviderId(Cow::Borrowed("adal"));
7677

7778
/// Returns all built-in provider IDs
7879
///
@@ -106,6 +107,7 @@ impl ProviderId {
106107
ProviderId::FIREWORKS_AI,
107108
ProviderId::NOVITA,
108109
ProviderId::GOOGLE_AI_STUDIO,
110+
ProviderId::ADAL,
109111
]
110112
}
111113

@@ -132,6 +134,7 @@ impl ProviderId {
132134
"fireworks-ai" => "FireworksAI".to_string(),
133135
"novita" => "Novita".to_string(),
134136
"google_ai_studio" => "GoogleAIStudio".to_string(),
137+
"adal" => "AdaL".to_string(),
135138
_ => {
136139
// For other providers, use UpperCamelCase conversion
137140
use convert_case::{Case, Casing};
@@ -177,6 +180,7 @@ impl std::str::FromStr for ProviderId {
177180
"fireworks-ai" => ProviderId::FIREWORKS_AI,
178181
"novita" => ProviderId::NOVITA,
179182
"google_ai_studio" => ProviderId::GOOGLE_AI_STUDIO,
183+
"adal" => ProviderId::ADAL,
180184
// For custom providers, use Cow::Owned to avoid memory leaks
181185
custom => ProviderId(Cow::Owned(custom.to_string())),
182186
};

crates/forge_repo/src/provider/provider.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,5 +3099,14 @@
30993099
"input_modalities": ["text"]
31003100
}
31013101
]
3102+
},
3103+
{
3104+
"id": "adal",
3105+
"api_key_vars": "ADAL_API_KEY",
3106+
"url_param_vars": [],
3107+
"response_type": "OpenAI",
3108+
"url": "https://api.sylph.ai/v1/chat/completions",
3109+
"models": "https://api.sylph.ai/v1/models",
3110+
"auth_methods": ["api_key"]
31023111
}
31033112
]

0 commit comments

Comments
 (0)