Repository navigation
agents: give --harness openhands a DigitalOcean Inference key and a DO model by default - #2058
Merged
Spherrrical merged 1 commit intoOct 19, 2026
Conversation
…O model by default An openhands session created by doctl could not talk to any model. Two things were missing from what doctl sent, both found on the first preview smoke: - No inference key. harness-api mints the session's DigitalOcean Inference key only when the agents.yaml create carries ?manage_model_access_key=true. The other harnesses never needed it (they ask for the user's own vendor key), so doctl never sent it, and the agent-server got an empty key. - No model. Without HARNESS_INFERENCE_MODEL the adapter falls back to the agent-server's `gpt-5.5`, which is not a DigitalOcean catalogue id, so the gateway answered the first turn with "model not found". Now: a manifest whose agent is openhands (from --harness or a --spec file) is created through CreateSessionFromManifestWithManagedKey, which sends the opt-in; a bring-your-own --secret HARNESS_INFERENCE_API_KEY=... still wins, the server skips the mint for it. --harness openhands writes env.HARNESS_INFERENCE_MODEL=openai-gpt-5.5, and a new --model flag overrides it (and sets the model for any other --harness when given; it is refused without --harness, where the manifest declares its own env). godo (through v1.229.0) has no field for manage_model_access_key, so the do layer builds that one request itself, mirroring godo's manifest create (same path, application/x-yaml body, godo's own options kept). Fold it into HostedAgentManifestCreateOptions when godo grows the field. Tests: manifest builder (default, override, other harnesses, codex-agentapi's existing env kept), create goes through the managed-key method for --harness and for a --spec saying agent: openhands, --model without --harness refused, --model rejected on an existing session like every other creation flag, and the do layer's request asserted on the wire with an httptest server.
Spherrrical
approved these changes
Oct 19, 2026
4 of 5 tasks
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.
An openhands session created by doctl could not talk to any model. Two things were missing, both found on the first preview smoke:
Now a manifest whose agent is openhands (from --harness or a --spec file) is created with the opt-in, a BYO --secret HARNESS_INFERENCE_API_KEY still wins, and --harness openhands writes env.HARNESS_INFERENCE_MODEL=openai-gpt-5.5 with a new --model flag to override it.
godo (through v1.229.0) has no field for manage_model_access_key, so the do layer builds that one request itself, mirroring godo's manifest create. To be folded into HostedAgentManifestCreateOptions when godo grows the field.
Verified live on the test environment:
doctl harness-runtime create --harness openhandsthenexec envin the guest shows HARNESS_INFERENCE_API_KEY set, HARNESS_INFERENCE_MODEL=openai-gpt-5.5 and the platform base URL.Tests: manifest builder (default, override, other harnesses), create goes through the managed-key path for --harness and for a --spec with agent: openhands, --model refused without --harness and on an existing session, and the do layer's request asserted on the wire with httptest.