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
12 changes: 12 additions & 0 deletions crates/openshell-core/src/inference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const OPENAI_PROTOCOLS: &[&str] = &[
"openai_chat_completions",
"openai_completions",
"openai_responses",
"openai_embeddings",
"model_discovery",
];

Expand Down Expand Up @@ -305,6 +306,17 @@ mod tests {
assert!(profile_for("OpenAI").is_some()); // case insensitive
}

#[test]
fn openai_compatible_profiles_include_embeddings() {
for provider_type in ["openai", "nvidia"] {
let profile = profile_for(provider_type).expect("provider profile should exist");
assert!(
profile.protocols.contains(&"openai_embeddings"),
"{provider_type} should route OpenAI-compatible embeddings"
);
}
}

#[test]
fn profile_for_unknown_types() {
assert!(profile_for("github").is_none());
Expand Down
Loading
Loading