Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/forge_app/src/dto/openai/transformers/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ impl Transformer for ProviderPipeline<'_> {

let reasoning_content = ReasoningContent.when(move |request: &Request| {
provider.id == ProviderId::FIREWORKS_AI
|| provider.id == ProviderId::FIREWORKS_AI_FIREPASS
|| is_deepseek_compatible(provider, request)
|| when_model("kimi")(request)
});
Comment thread
amitksingh1490 marked this conversation as resolved.
Expand All @@ -103,6 +104,7 @@ impl Transformer for ProviderPipeline<'_> {
.pipe(EnforceStrictResponseFormatSchema)
.when(move |_| {
provider.id == ProviderId::FIREWORKS_AI
|| provider.id == ProviderId::FIREWORKS_AI_FIREPASS
|| provider.id == ProviderId::OPENCODE_ZEN
|| provider.id == ProviderId::OPENCODE_GO
|| provider.id == ProviderId::XAI
Expand Down
26 changes: 26 additions & 0 deletions crates/forge_domain/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ impl ProviderId {
pub const OPENCODE_ZEN: ProviderId = ProviderId(Cow::Borrowed("opencode_zen"));
pub const OPENCODE_GO: ProviderId = ProviderId(Cow::Borrowed("opencode_go"));
pub const FIREWORKS_AI: ProviderId = ProviderId(Cow::Borrowed("fireworks-ai"));
pub const FIREWORKS_AI_FIREPASS: ProviderId =
ProviderId(Cow::Borrowed("fireworks-ai-firepass"));
pub const NOVITA: ProviderId = ProviderId(Cow::Borrowed("novita"));
pub const VIVGRID: ProviderId = ProviderId(Cow::Borrowed("vivgrid"));
pub const GOOGLE_AI_STUDIO: ProviderId = ProviderId(Cow::Borrowed("google_ai_studio"));
Expand Down Expand Up @@ -111,6 +113,7 @@ impl ProviderId {
ProviderId::OPENCODE_ZEN,
ProviderId::OPENCODE_GO,
ProviderId::FIREWORKS_AI,
ProviderId::FIREWORKS_AI_FIREPASS,
ProviderId::NOVITA,
ProviderId::VIVGRID,
ProviderId::GOOGLE_AI_STUDIO,
Expand Down Expand Up @@ -144,6 +147,7 @@ impl ProviderId {
"opencode_zen" => "OpenCode Zen".to_string(),
"opencode_go" => "OpenCode Go".to_string(),
"fireworks-ai" => "FireworksAI".to_string(),
"fireworks-ai-firepass" => "FireworksAIFirepass".to_string(),
"novita" => "Novita".to_string(),
"vivgrid" => "Vivgrid".to_string(),
"google_ai_studio" => "GoogleAIStudio".to_string(),
Expand Down Expand Up @@ -195,6 +199,7 @@ impl std::str::FromStr for ProviderId {
"codex" => ProviderId::CODEX,
"opencode_go" => ProviderId::OPENCODE_GO,
"fireworks-ai" => ProviderId::FIREWORKS_AI,
"fireworks-ai-firepass" => ProviderId::FIREWORKS_AI_FIREPASS,
"novita" => ProviderId::NOVITA,
"vertex_ai_anthropic" => ProviderId::VERTEX_AI_ANTHROPIC,
"bedrock" => ProviderId::BEDROCK,
Expand Down Expand Up @@ -794,6 +799,27 @@ mod tests {
assert_eq!(actual, expected);
}

#[test]
fn test_fireworks_ai_firepass_from_str() {
let actual = ProviderId::from_str("fireworks-ai-firepass").unwrap();
let expected = ProviderId::FIREWORKS_AI_FIREPASS;
assert_eq!(actual, expected);
}

#[test]
fn test_fireworks_ai_firepass_display_name() {
assert_eq!(
ProviderId::FIREWORKS_AI_FIREPASS.to_string(),
"FireworksAIFirepass"
);
}

#[test]
fn test_fireworks_ai_firepass_in_built_in_providers() {
let built_in = ProviderId::built_in_providers();
assert!(built_in.contains(&ProviderId::FIREWORKS_AI_FIREPASS));
}

#[test]
fn test_azure_provider() {
let fixture = azure("test_key", "my-resource", "gpt-4", "2024-02-15-preview");
Expand Down
40 changes: 20 additions & 20 deletions crates/forge_repo/src/provider/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -3299,26 +3299,6 @@
"url": "https://api.fireworks.ai/inference/v1/chat/completions",
"auth_methods": ["api_key"],
"models": [
{
"id": "accounts/fireworks/routers/kimi-k2p5-turbo",
"name": "Kimi K2.5 Turbo (Firepass) ",
"description": "Kimi K2.5 Turbo model",
"context_length": 256000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "accounts/fireworks/routers/kimi-k2p6-turbo",
"name": "Kimi K2.6 Turbo (Fire Pass)",
"description": "Kimi K2.6 Turbo model",
"context_length": 262144,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "accounts/fireworks/models/kimi-k2p5",
"name": "Kimi K2.5",
Expand Down Expand Up @@ -3460,6 +3440,26 @@
}
]
},
{
"id": "fireworks-ai-firepass",
"api_key_vars": "FIREWORKS_AI_FIREPASS_API_KEY",
"url_param_vars": [],
"response_type": "OpenAI",
"url": "https://api.fireworks.ai/inference/v1/chat/completions",
"auth_methods": ["api_key"],
"models": [
{
"id": "accounts/fireworks/routers/kimi-k2p6-turbo",
"name": "Kimi K2.6 Turbo (firepass)",
"description": "Kimi K2.6 Turbo model",
"context_length": 262144,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
}
]
},
{
"id": "modal",
"api_key_vars": "MODAL_API_KEY",
Expand Down
Loading