Skip to content

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Nov 6, 2025

Summary

  • add runtime LLM profile switching support for local conversations
  • document the workflow and provide an example script
  • describe constraints around inline mode and idle status

Testing

  • unit tests via pre-commit hooks

Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:4075571-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-4075571-python \
  ghcr.io/openhands/agent-server:4075571-python

All tags pushed for this build

ghcr.io/openhands/agent-server:4075571-golang-amd64
ghcr.io/openhands/agent-server:v1.0.0a5_golang_tag_1.21-bookworm_binary-amd64
ghcr.io/openhands/agent-server:4075571-golang-arm64
ghcr.io/openhands/agent-server:v1.0.0a5_golang_tag_1.21-bookworm_binary-arm64
ghcr.io/openhands/agent-server:4075571-java-amd64
ghcr.io/openhands/agent-server:v1.0.0a5_eclipse-temurin_tag_17-jdk_binary-amd64
ghcr.io/openhands/agent-server:4075571-java-arm64
ghcr.io/openhands/agent-server:v1.0.0a5_eclipse-temurin_tag_17-jdk_binary-arm64
ghcr.io/openhands/agent-server:4075571-python-amd64
ghcr.io/openhands/agent-server:v1.0.0a5_nikolaik_s_python-nodejs_tag_python3.12-nodejs22_binary-amd64
ghcr.io/openhands/agent-server:4075571-python-arm64
ghcr.io/openhands/agent-server:v1.0.0a5_nikolaik_s_python-nodejs_tag_python3.12-nodejs22_binary-arm64
ghcr.io/openhands/agent-server:4075571-golang
ghcr.io/openhands/agent-server:4075571-java
ghcr.io/openhands/agent-server:4075571-python

About Multi-Architecture Support

  • Each variant tag (e.g., 4075571-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 4075571-python-amd64) are also available if needed

openhands-agent and others added 30 commits October 18, 2025 16:18
…sation startup\n\n- ProfileManager manages ~/.openhands/llm-profiles/*.json (load/save/list/register)\n- LocalConversation now calls ProfileManager.register_all to eagerly populate LLMRegistry\n\nCo-authored-by: openhands <[email protected]>
- embed profile lifecycle APIs into the registry
- update persistence helpers, docs, and examples to use registry
- replace profile manager tests with registry profile coverage

Co-authored-by: openhands <[email protected]>
- note that LLMRegistry is the unified entry point for disk and runtime profiles
- mention how to override the profile directory when embedding the SDK

Co-authored-by: openhands <[email protected]>
- rename payload helpers to resolve_llm_profiles/compact_llm_profiles
- update conversation state to use clearer helper names
- drop the optional agent_settings convenience module and its tests

Co-authored-by: openhands <[email protected]>
- replace the _transform flag with dedicated _compact/_resolve helpers
- make compact_llm_profiles/resolve_llm_profiles easier to follow by delegating to the new helpers

Co-authored-by: openhands <[email protected]>
Bring in new package layout and port LLM profile switching support.
Revert the in-progress switch_llm helpers and tests; agent-sdk-18 branch now only contains LLM profile persistence.
Example 25 now performs a read/write/delete workflow and verifies the persisted profile reference.
- move inline/profile compaction into LLM serializer/validator
- use model_dump_json context in ConversationState persistence
- add persistence settings module and cover profile reference tests
- document persistence comparison and recommendations
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/agent
   base.py1672585%156, 162, 180–182, 211–212, 218–220, 233, 241–242, 273, 319, 326, 335–337, 347, 384–385, 395–396, 427
openhands-sdk/openhands/sdk/conversation
   state.py1804773%195, 200–202, 204–205, 211, 236, 281–283, 299–300, 307–308, 312, 316, 318–324, 326–328, 355, 373, 382, 397, 403, 411, 423–436
openhands-sdk/openhands/sdk/conversation/impl
   local_conversation.py1845172%142–143, 148–149, 174, 179, 184–187, 204, 221, 229–231, 235–236, 288–289, 292, 299, 320–322, 324, 340, 342, 344, 348, 350–352, 354, 356, 362–363, 376–377, 379, 381, 385–388, 406, 414, 416–418, 436, 438
openhands-sdk/openhands/sdk/llm
   llm.py46819159%328, 343, 348–352, 354–355, 362–363, 367–371, 374, 379, 383, 387, 391–393, 397–398, 409–410, 412–413, 417, 434, 459, 464, 468, 473, 493, 522, 543, 547, 562, 568–569, 588–589, 597, 622–627, 648–649, 652, 656, 668, 673–676, 683, 686, 694–699, 703–706, 708, 721, 725–727, 729–730, 735–736, 738, 745, 748–753, 821–824, 829–833, 835–840, 842–844, 853–855, 858–859, 900–901, 904–907, 948, 962, 1012, 1015–1017, 1020–1028, 1032–1034, 1037, 1040–1042, 1049–1050, 1059, 1066–1068, 1072, 1074–1079, 1081–1098, 1101–1105, 1107–1108, 1114–1123, 1136, 1150, 1155
   llm_registry.py1357544%90–91, 97, 113, 118, 127–132, 135, 148–149, 154–155, 157–160, 162–166, 170, 175–178, 185–187, 191–194, 196–199, 206–210, 212–216, 218–221, 226–233, 235–237, 265–268, 282–283, 288, 291, 296
TOTAL11854552753% 

@openhands-ai
Copy link

openhands-ai bot commented Nov 6, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Pre-commit checks
    • Check Documented Examples

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #1049 at branch `agent-sdk-26-llm-switch`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants