Skip to content

Fix semantic-agent-routing: use evaluation: key, register typesafe-ai expert - #297

Open
gnodet wants to merge 1 commit into
apache:mainfrom
gnodet:fix/camel-semantic-yaml-question-key
Open

gnodet wants to merge 1 commit into
apache:mainfrom
gnodet:fix/camel-semantic-yaml-question-key

Conversation

@gnodet

@gnodet gnodet commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Problem

The semantic-agent-routing example failed to start with three errors:

  1. question: is not a valid key — the YAML DSL deserializer only accepts evaluation: (and audit:) inside the semantic: block. Using question: caused an "Unknown property" error at parse time.

  2. Missing expert: per evaluation — each evaluation block must declare an expert: field naming the SemanticAdapter registry bean to use. The evaluations had none.

  3. Missing camel-semantic-typesafe-ai dependency — this module provides TypeSafeAiSemanticAdapter, the bridge between the semantic language and the TypeSafe AI component. Without it, no bean implementing SemanticAdapter is available to register.

Fix

  • Replace question: with evaluation: in coordinator.yaml
  • Add expert: typesafe-ai to each evaluation block
  • Register a TypeSafeAiSemanticAdapter bean named typesafe-ai in the YAML beans: block
  • Add camel-semantic-typesafe-ai to pom.xml (it is in the BOM, no version needed)

All 20 tests in RoutingTest now pass.

…-ai and camel-semantic-typesafe-ai dep

The coordinator YAML had three issues:
- Used 'question:' instead of 'evaluation:' as the key for the semantic
  evaluations block; 'question:' is unknown and was rejected at parse time
- Each evaluation was missing the required 'expert: typesafe-ai' field;
  the expert name is mandatory and must reference a registered SemanticAdapter bean
- camel-semantic-typesafe-ai was not declared as a dependency; it provides
  TypeSafeAiSemanticAdapter which must be registered as the 'typesafe-ai' bean
  (added to the beans: block in coordinator.yaml)
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