Skip to content

Require the harness for a non-empty harness_config - #507

Merged
SaladDay merged 1 commit into
aos/cutoverfrom
aos/r2-harness-config
Oct 7, 2026
Merged

SaladDay merged 1 commit into
aos/cutoverfrom
aos/r2-harness-config

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

A non-empty x_agents_core.harness_config now requires an explicitly selected Harness: the Agent's x_agents_core.harness, or for a Session the inline agent.x_agents_core.harness or the saved Agent's. The deployment default does not count. Without one, the request fails with 400 invalid_request_error, and param names the missing field.

  • harnessconfig.Registry.ValidateHarnessConfig returns ErrHarnessRequired for an empty kind. The loop that accepted the object if any registered adapter parsed it is deleted.
  • Saved Agent create/update and Session creation map the error to the field of their own resource.
  • model-execution.md and public-agent-api.md record the rule (en + zh).

Architecture audit 30-P9 (Runtime–Harness alignment, lane R2).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Native parameters belong to one adapter, so validating them against
whichever registered adapter accepts them was an implicit fallback. Delete
the any-adapter loop: an empty kind with parameters now returns
harnessconfig.ErrHarnessRequired.

The resolved Agent decides: a saved Agent after the write (an update keeps
the saved harness) and, for a Session, the inline agent's harness or the
saved Agent's. Both reject with 400 invalid_request_error and a param that
names the missing field.
@SaladDay
SaladDay merged commit 93b21d8 into aos/cutover Oct 7, 2026
1 check passed
@SaladDay
SaladDay deleted the aos/r2-harness-config branch October 7, 2026 17:21
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.

1 participant