fix: allow local models without API keys#733
Conversation
Support Ollama and local OpenAI-compatible endpoints in CLI settings and headless env overrides without requiring LLM_API_KEY. Fixes OpenHands#673
| "ollama", | ||
| "sagemaker", | ||
| "vertex_ai", | ||
| "vertex_ai_beta", |
There was a problem hiding this comment.
We have tried to avoid more special LLM/provider code, even though we have been a bit inconsistent. I think maybe rules for some providers, if they are really necessary, could be in the agent-sdk.
On the other hand, I thought bedrock works for no-password case. Have you tried it?
enyst
left a comment
There was a problem hiding this comment.
I think maybe this belongs in the agent-sdk if we need to do more to support this. I kinda thought it was already supported, but maybe we missed something?
Could you post logs or screenshots to show what failed and what works?
|
This PR is stale because it has been open for 40 days with no activity. Remove the stale label or leave a comment, otherwise it will be closed in 10 days. |
|
This PR was closed because it had no activity for 50 days. If you feel this was closed in error, and you would like to continue the PR, please resubmit or let us know. |
Summary
--override-with-envsto create agents for local/Ollama models withoutLLM_API_KEYTesting
uv run ruff check openhands_cli/stores/agent_store.py openhands_cli/tui/modals/settings/utils.py openhands_cli/tui/modals/settings/settings_screen.py tests/stores/test_env_llm_overrides.py tests/tui/modals/settings/test_settings_utils.py tests/tui/modals/settings/test_settings_screen.pyuv run pytest -q tests/stores/test_env_llm_overrides.py tests/tui/modals/settings/test_settings_utils.py tests/tui/modals/settings/test_settings_screen.pyFixes #673