fix(#696): exit with typed error when stdin is not a TTY and no prompt piped; fix anthropic/ prefix detection in metadata_for_model

This commit is contained in:
YeonGyu-Kim
2026-05-25 13:16:12 +09:00
parent da7924d079
commit 63a5a87471
2 changed files with 9 additions and 1 deletions

View File

@@ -234,7 +234,7 @@ pub fn resolve_model_alias(model: &str) -> String {
#[must_use]
pub fn metadata_for_model(model: &str) -> Option<ProviderMetadata> {
let canonical = resolve_model_alias(model);
if canonical.starts_with("claude") {
if canonical.starts_with("claude") || canonical.starts_with("anthropic/") {
return Some(ProviderMetadata {
provider: ProviderKind::Anthropic,
auth_env: "ANTHROPIC_API_KEY",