fix(actor): add v3 YAML text generation for built-in actors #10895

Closed
hurui200320 wants to merge 1 commits from bugfix/m3-built-in-actor-v3-yaml into master

1 Commits

Author SHA1 Message Date
hurui200320 db6ff7ba58 fix(actor): add v3 YAML text generation for built-in actors
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 50s
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 4s
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 41s
CI / quality (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 3m51s
CI / coverage (pull_request) Failing after 1m19s
CI / e2e_tests (pull_request) Successful in 4m28s
CI / unit_tests (pull_request) Failing after 1m57s
CI / lint (pull_request) Successful in 1m16s
CI / typecheck (pull_request) Successful in 1m54s
CI / security (pull_request) Successful in 2m7s
Built-in actors (e.g., openai/gpt-4, anthropic/claude-3-opus) were failing
silently with agents actor run because they lacked the required v3 type
field in their stored configuration. The ReactiveConfigParser._is_v3_format()
check failed, resulting in empty agents/routes dictionaries and no output.

This fix adds _generate_builtin_actor_yaml() helper to ActorRegistry that
generates spec-compliant v3 YAML text including:
- type: llm (required for v3 format recognition)
- description (required by v3 schema)
- name, model, provider, capabilities, unsafe, source fields

The ensure_built_in_actors() method now calls this helper and persists
yaml_text via upsert_actor(), ensuring built-in actors work identically
to custom actors with the agents actor run command.

Existing built-in actors will be automatically refreshed on next startup
since they are regenerated from the provider registry - no database
migration needed.

Added:
- _generate_builtin_actor_yaml() helper method
- BDD feature file with scenarios for v3 YAML format
- Step definitions for new BDD scenarios
- Unit tests covering YAML generation and schema validation
- CHANGELOG entry

ISSUES CLOSED: #10883
2026-04-28 08:25:03 +00:00