Skip to content

fix(daemon): expose config backend option to responses#908

Open
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/codex-daemon-backend-options-schema
Open

fix(daemon): expose config backend option to responses#908
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/codex-daemon-backend-options-schema

Conversation

@TZZheng

@TZZheng TZZheng commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • explicitly expose tasks[].backend_options.config in the daemon tool schema so constrained Responses providers can generate the key
  • preserve the existing typed additionalProperties contract, keeping Expose daemon backend options schema #849's generic CLI-option passthrough open-ended
  • cover both the canonical daemon schema and the transformed OpenAI Responses wire schema with regressions
  • repair the Responses scrub docstring example made stale by the new explicit property; scrub behavior is unchanged

Problem

#849 added the runtime passthrough from backend_options to backend CLI arguments. The provider-facing schema, however, described backend_options only with additionalProperties.

The Codex Responses compatibility scrub adds properties: {} to object schemas that lack an explicit properties key because the endpoint rejects that original free-form shape. Under constrained tool generation, that transformed schema could express only an empty backend_options object, so values such as:

{"config": ["model_reasoning_effort=\"ultra\""]}

never reached the already-correct runtime argument conversion.

Implementation

_backend_option_value_schema() returns a fresh copy of the existing safe scalar/list option-value contract. backend_options.properties.config and backend_options.additionalProperties each receive an independent copy of that same contract. This makes config nameable to constrained providers without enumerating or narrowing other backend flags.

Follow-up to #849.

Validation

  • PYTHONPATH=src PYTHONDONTWRITEBYTECODE=1 $LINGTAI_RUNTIME_PYTHON -m pytest -q -p no:cacheprovider tests/test_daemon_backend_options.py tests/test_wire_tool_description.py tests/test_tool_glossary.py tests/test_daemon_codex_submanual.py tests/test_daemon_opencode_submanual.py231 passed
  • git diff --check — passed
  • scoped daemon and OpenAI anatomy drift checks — passed; no cited symbol moved and no anatomy update was required
  • exact-final-HEAD Claude Opus/max review — PASS (full diff and cited code traced, scrub/runtime/schema assertions verified, git diff --check clean; no blocking findings)
  • exact-final-HEAD Codex ultra review — PASS (18 focused tests, full 8-test wire file, Draft 7 schema validation, and direct schema-flow probes; no blocking findings)

Ruff was unavailable in the active runtime and is not claimed as run.

Scope

No runtime argument conversion, persistence, logging, global Codex configuration, adapter behavior, or unrelated daemon routing is changed.

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