Auto-detects the active provider by scanning well-known environment variables
and CLI binaries in priority order.
Returns the identifier of the first provider whose key/URL env var is non-empty
or whose CLI binary is on PATH, or undefined when no recognisable runtime is present.
Auto-detects the active provider by scanning well-known environment variables and CLI binaries in priority order.
Returns the identifier of the first provider whose key/URL env var is non-empty or whose CLI binary is on PATH, or
undefinedwhen no recognisable runtime is present.Priority: openrouter → openai → anthropic → gemini → claude-code-cli → gemini-cli → ollama → …