MCPcopy Create free account
hub / github.com/BerriAI/litellm / is_opencode_api_base

Function is_opencode_api_base

litellm/llms/opencode/common_utils.py:14–20  ·  view source on GitHub ↗
(api_base: str | None)

Source from the content-addressed store, hash-verified

12
13
14def is_opencode_api_base(api_base: str | None) -> bool:
15 return bool(
16 api_base
17 and re.fullmatch(
18 r"https://opencode\.ai/(?:zen(?:/go)?|inference/(?:go/)?(?:openai|anthropic))(?:/v1)?/?", api_base
19 )
20 )
21
22
23def go_model_info(model: str) -> Mapping[str, object]:

Callers 3

provider_affinityFunction · 0.90
provider_affinityFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected