fix(agent-server): resolve linked providers for plaintext profile reads - #28
Closed
enyst wants to merge 1 commit into
Closed
fix(agent-server): resolve linked providers for plaintext profile reads#28enyst wants to merge 1 commit into
enyst wants to merge 1 commit into
Conversation
Return current linked credentials to runtime clients without changing stored profiles or default settings. Keep editor reads unresolved. Cover encrypted storage, rotation, and real HTTP profile selection with RemoteWorkspace. Co-authored-by: openhands <openhands@all-hands.dev>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Python API breakage checks — ✅ PASSEDResult: ✅ PASSED |
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
1 task
Owner
Author
|
Relocated upstream: opened as OpenHands#4952 (base |
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.
HUMAN:
AGENT:
I am an AI agent acting on behalf of Engel.
Why
OpenHands/extensions#547 selects a named LLM profile and passes its configuration to a new conversation, but plaintext profile reads currently omit a linked provider's API key and base URL.
Summary
GET /api/profiles/{name}withX-Expose-Secrets: plaintext.RemoteWorkspace.get_llm(profile_name=...).Issue Number
Supports OpenHands/extensions#548 and OpenHands/automation#430.
How to Test
uv run pytest tests/agent_server/test_profiles_router.py -q uv run pytest tests/cross/test_remote_conversation_live_server.py -k 'workspace_named_llm_resolves_current_provider_credentials or workspace_default_llm_resolves_active_profile_despite_settings_drift' -q uv run pre-commit run --files openhands-agent-server/openhands/agent_server/profiles_router.py tests/agent_server/test_profiles_router.py tests/cross/test_remote_conversation_live_server.pyResults: 106 profile tests passed; both live-server tests passed; all applicable pre-commit hooks passed.
The live test starts Uvicorn, creates a provider and profile through HTTP, selects the profile through the SDK, rotates the provider key, and confirms the next selection uses that key while the active default is unchanged.
The existing shared-provider test failed on the original route because the plaintext API key was
None, then passed with this fix.Type
Notes
The GitHub connection rejected opening this PR in OpenHands/software-agent-sdk (403: resource not accessible by integration), so this reviewable PR targets the freshly synchronized fork main. Merging it here does not update upstream; apply commit
8e6ff575035022cb5a1b860761844c6d2756d3f6to upstream for rollout.This dependency must reach the deployed Agent Server before the extensions OpenHands#547 follow-up can run provider-linked profiles. No external LLM calls are used by these tests. Draft pending the repository's human review requirement.