mirror of
https://github.com/instructkr/claw-code.git
synced 2026-10-19 00:00:08 +08:00
The test explicit_model_provider_hint_controls_runtime_provider_dispatch was failing when OPENAI_BASE_URL was set in the environment to a non-standard URL (e.g., api.layofflabs.com). The test expects the OpenAI provider to use the default base URL (api.openai.com) when no explicit base_url is provided in the ProviderConfig. This fix adds an EnvVarGuard struct to the tests module and uses it to ensure OPENAI_BASE_URL is unset before running the test, preventing environment pollution from affecting the test result. Fixes: https://github.com/ultraworkers/claw-code/issues/3345 Co-authored-by: clawdbot <clawdbot@ultraworkers.dev>