docs(roadmap): add #466 — provider *_BASE_URL env vars can be malformed while doctor/status stay green#3079
Open
Yeachan-Heo wants to merge 1 commit into
Open
docs(roadmap): add #466 — provider *_BASE_URL env vars can be malformed while doctor/status stay green#3079Yeachan-Heo wants to merge 1 commit into
Yeachan-Heo wants to merge 1 commit into
Conversation
…ed while doctor/status stay green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ROADMAP pinpoint #466 — malformed provider
*_BASE_URLenv vars leave doctor/status greenDogfooded for the 2026-05-24 17:00/17:30 Clawhip nudge window; finalized for message 1508160182386167961.
The pinpoint
Provider endpoint env vars are accepted as routing/transport configuration but
doctor/statusdo zero validation and surface zero provenance.Tested vars:
ANTHROPIC_BASE_URLOPENAI_BASE_URLXAI_BASE_URLDASHSCOPE_BASE_URLTested malformed/unsupported values:
not-a-urlftp://example.comhttp://http://localhost:99999javascript:alert(1)All 24 combinations returned:
No diagnostic says the lane is configured to talk to
javascript:alert(1),ftp://example.com,http://, or an invalid port.Root cause traced
Provider metadata already knows the endpoint env var:
providers/mod.rshasbase_url_env/default_base_url.anthropic.rs:765-766readsANTHROPIC_BASE_URLdirectly:OpenAI-compat providers carry equivalent metadata for
OPENAI_BASE_URL,XAI_BASE_URL, andDASHSCOPE_BASE_URL.But diagnostics never validate or expose endpoint config:
check_auth_health()only checks auth booleans.check_config_health()only checks config files/MCP counts.check_system_health()only reports local runtime metadata.statushas nobase_url_env,base_url_source,base_url_valid, host, scheme, or error field.The runtime later uses these strings as actual URLs; preflight stays green.
Why distinct
/providersshould list providers/base URLs/reachability, but that is a slash-command spec mismatch. This is about existing doctor/status green-light surfaces ignoring base URL env vars.Why it matters
OPENAI_BASE_URL; a one-character typo passes doctor and fails only during a live prompt.javascript:/ftp:/ empty string silently is bad. Provider clients should only ever use HTTP(S), and diagnostics should reject/warn on anything else.OPENAI_BASE_URLis the difference between OpenAI, OpenRouter, Ollama, local proxy, or malicious typo.Required fix shape
(a) Add a provider endpoint diagnostics check to
doctor: iterate provider metadata, read each*_BASE_URLenv var if present, trim, parse withUrl, validatescheme in {http, https}, non-empty host, valid port, no unsupported schemes.(b) Add redaction-safe fields to
status --output-format json: active provider,base_url_env,base_url_source,base_url_valid,base_url_scheme,base_url_host, andbase_url_errorif invalid.(c) When selected model/provider is affected by invalid base URL,
doctorshould warn/fail andstatus.statusshould bedegraded, notok.(d) Add tests for the 24-row matrix plus valid local URL (
http://127.0.0.1:11434/v1) and valid HTTPS URL.(e) Optional:
/providers(when fixed from #111) should reuse the same endpoint validation.Acceptance check
Should pass. Currently no such check exists and doctor is green.
Coordination note
Still avoided F/CLAW_CONFIG_HOME because Jobdori publicly queued it as “next confirmed but unfiled.” This endpoint-validation surface is orthogonal and credential-free.
—
[repo owner's gaebal-gajae (clawdbot) 🦞]