fix(provider): address Astrai follow-up review from #486

- Add "astrai" to factory_all_providers_create_successfully test
- Add "astrai" => "ASTRAI_API_KEY" in provider_env_var() for onboarding
- Add Astrai to onboarding provider selection list (Gateway tier)
- Add provider_env_var("astrai") assertion in known_providers test

Addresses review comments from @chumyin on #486.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maya Walcher 2026-02-17 15:35:27 -05:00 committed by Chummy
parent 92eeb8889f
commit c830a513a5
2 changed files with 7 additions and 0 deletions

View file

@ -1402,6 +1402,10 @@ fn setup_provider(workspace_dir: &Path) -> Result<(String, String, String, Optio
2 => vec![
("vercel", "Vercel AI Gateway"),
("cloudflare", "Cloudflare AI Gateway"),
(
"astrai",
"Astrai — compliant AI routing (PII stripping, cost optimization)",
),
("bedrock", "Amazon Bedrock — AWS managed models"),
],
3 => vec![
@ -2002,6 +2006,7 @@ fn provider_env_var(name: &str) -> &'static str {
"bedrock" | "aws-bedrock" => "AWS_ACCESS_KEY_ID",
"gemini" => "GEMINI_API_KEY",
"nvidia" | "nvidia-nim" | "build.nvidia.com" => "NVIDIA_API_KEY",
"astrai" => "ASTRAI_API_KEY",
_ => "API_KEY",
}
}
@ -4793,6 +4798,7 @@ mod tests {
assert_eq!(provider_env_var("nvidia"), "NVIDIA_API_KEY");
assert_eq!(provider_env_var("nvidia-nim"), "NVIDIA_API_KEY"); // alias
assert_eq!(provider_env_var("build.nvidia.com"), "NVIDIA_API_KEY"); // alias
assert_eq!(provider_env_var("astrai"), "ASTRAI_API_KEY");
}
#[test]

View file

@ -1347,6 +1347,7 @@ mod tests {
"cohere",
"copilot",
"nvidia",
"astrai",
];
for name in providers {
assert!(