refactor(ai): rename experimental_evaluate to experimental_decide
Background
Rename the experimental evaluation API to experimental_decide and align its models and results with decision terminology, while preserving existing public APIs through deprecated aliases.
Summary
- Rename the function, model methods (
doDecide), factories (decisionModel), custom aliases (decisionModels), types, and errors. - Update lifecycle callbacks, tracing, and telemetry operation names, along with docs and runnable examples.
- Add the provider-utils
experimental-decisionentry point and retain the deprecatedexperimental-evaluationentry point. - Preserve compatibility through deprecated public aliases, legacy
doEvaluatemodels, and existing provider registry configurations. - Preserve deprecated telemetry hooks and options, including OpenTelemetry subclass overrides that call
super. - Update Gateway to use
/decision-model, the decision specification header, and decision model catalog terminology. - Add a patch changeset for affected packages.
TypeSafe request and response formats remain unchanged. The Gateway protocol was changed.
End-to-End Verification
Ran the mock example through the public experimental_decide export and confirmed it returned the expected typed answer.
Added regression coverage for deprecated aliases, legacy models, provider methods, registry configurations, and telemetry subclass overrides.
Validation
Package builds, focused Node and edge tests, full workspace type checking (including examples), linting and formatting, documentation validation, and repository convention checks passed. All 228 OpenTelemetry tests passed.
Checklist
- All commits are signed (PRs with unsigned commits cannot be merged)
- Tests have been added / updated (for bug fixes / features)
- Documentation has been added / updated (for bug fixes / features)
- A patch changeset for relevant packages has been added (for bug fixes / features — run
pnpm changesetin the project root) - I have reviewed this pull request (self-review)