Skip to main content

is_opencode_target

Function is_opencode_target 

pub fn is_opencode_target(base_url: &str) -> bool
Expand description

True when base_url addresses the OpenCode relay.

Matches opencode.ai and any subdomain of it, so the built-in Zen and Go endpoints and an operator’s uri override all resolve alike. Matching is on the parsed host, so a lookalike such as opencode.ai.example.com or notopencode.ai is correctly rejected.