feat(onboard): add signup URL, model catalog, and live fetch for Astrai
Add three onboarding improvements for the Astrai provider: - Signup URL: users now see "Get your API key at: https://as-trai.com" during onboarding instead of a blank prompt - Curated model list: auto (best execution), GPT-4o, Claude Sonnet 4.5, DeepSeek V3, Llama 3.3 70B - Live model fetch: Astrai's OpenAI-compatible /v1/models endpoint is now queried when an API key is present, matching other providers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d70324f4f7
commit
63bc4721e3
1 changed files with 16 additions and 0 deletions
|
|
@ -776,6 +776,7 @@ fn supports_live_model_fetch(provider_name: &str) -> bool {
|
||||||
| "together-ai"
|
| "together-ai"
|
||||||
| "gemini"
|
| "gemini"
|
||||||
| "ollama"
|
| "ollama"
|
||||||
|
| "astrai"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1023,6 +1024,9 @@ fn fetch_live_models_for_provider(provider_name: &str, api_key: &str) -> Result<
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"astrai" => {
|
||||||
|
fetch_openai_compatible_models("https://as-trai.com/v1/models", api_key.as_deref())?
|
||||||
|
}
|
||||||
_ => Vec::new(),
|
_ => Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1654,6 +1658,7 @@ fn setup_provider(workspace_dir: &Path) -> Result<(String, String, String, Optio
|
||||||
"nvidia" | "nvidia-nim" | "build.nvidia.com" => "https://build.nvidia.com/",
|
"nvidia" | "nvidia-nim" | "build.nvidia.com" => "https://build.nvidia.com/",
|
||||||
"bedrock" => "https://console.aws.amazon.com/iam",
|
"bedrock" => "https://console.aws.amazon.com/iam",
|
||||||
"gemini" => "https://aistudio.google.com/app/apikey",
|
"gemini" => "https://aistudio.google.com/app/apikey",
|
||||||
|
"astrai" => "https://as-trai.com",
|
||||||
_ => "",
|
_ => "",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1819,6 +1824,16 @@ fn setup_provider(workspace_dir: &Path) -> Result<(String, String, String, Optio
|
||||||
("gemini-1.5-pro", "Gemini 1.5 Pro (best quality)"),
|
("gemini-1.5-pro", "Gemini 1.5 Pro (best quality)"),
|
||||||
("gemini-1.5-flash", "Gemini 1.5 Flash (balanced)"),
|
("gemini-1.5-flash", "Gemini 1.5 Flash (balanced)"),
|
||||||
],
|
],
|
||||||
|
"astrai" => vec![
|
||||||
|
("auto", "Auto — Astrai best execution routing (recommended)"),
|
||||||
|
("gpt-4o", "GPT-4o (OpenAI via Astrai)"),
|
||||||
|
(
|
||||||
|
"claude-sonnet-4.5",
|
||||||
|
"Claude Sonnet 4.5 (Anthropic via Astrai)",
|
||||||
|
),
|
||||||
|
("deepseek-v3", "DeepSeek V3 (best value via Astrai)"),
|
||||||
|
("llama-3.3-70b", "Llama 3.3 70B (open source via Astrai)"),
|
||||||
|
],
|
||||||
_ => vec![("default", "Default model")],
|
_ => vec![("default", "Default model")],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -4634,6 +4649,7 @@ mod tests {
|
||||||
assert!(supports_live_model_fetch("grok"));
|
assert!(supports_live_model_fetch("grok"));
|
||||||
assert!(supports_live_model_fetch("together"));
|
assert!(supports_live_model_fetch("together"));
|
||||||
assert!(supports_live_model_fetch("ollama"));
|
assert!(supports_live_model_fetch("ollama"));
|
||||||
|
assert!(supports_live_model_fetch("astrai"));
|
||||||
assert!(!supports_live_model_fetch("venice"));
|
assert!(!supports_live_model_fetch("venice"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue