mirror of
https://github.com/browser-use/browser-use.git
synced 2026-09-14 19:59:47 +08:00
be76e6ccee
AsyncOpenAI falls back to OPENAI_API_KEY when api_key is unset, so ChatOrcaRouter(model=...) with no key authenticated its requests to api.orcarouter.ai with the user's OpenAI credentials. The shipped example hit this path whenever ORCAROUTER_API_KEY was unset, and .env.example documented a variable that nothing read. Resolve api_key from the constructor then ORCAROUTER_API_KEY, and raise ModelProviderError(401) when neither is set, matching ChatMistral.