Skip to main content

protocol_for

Function protocol_for 

Source
pub fn protocol_for(npm: &str) -> (Api, AuthMethod)
Expand description

Map a models.dev npm string to oxicode’s API type and authentication method.

This is the only protocol knowledge oxicode has. For OpenAI-compatible providers, the base URL from MdProvider.api is used at materialize time. Fresh npm values not listed here default to OpenAI-compatible (OpenAiCompletions).