MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / openai_compatible

Method openai_compatible

crates/opencode-provider/src/openai.rs:303–312  ·  view source on GitHub ↗
(base_url: impl Into<String>, api_key: impl Into<String>)

Source from the content-addressed store, hash-verified

301 }
302
303 pub fn openai_compatible(base_url: impl Into<String>, api_key: impl Into<String>) -> Self {
304 Self::from_config(
305 OpenAIConfig {
306 api_key: api_key.into(),
307 base_url: Some(base_url.into()),
308 organization: None,
309 },
310 true,
311 )
312 }
313
314 fn prefers_legacy_route(&self) -> bool {
315 self.legacy_only

Callers

nothing calls this directly

Calls 1

from_configFunction · 0.85

Tested by

no test coverage detected