[AI-3] Register AI features and resolve their models at runtime - #24888
[AI-3] Register AI features and resolve their models at runtime#24888tangopium wants to merge 1 commit into
Conversation
|
Caution The provided work package version does not match the core version Details:
Please make sure that:
|
|
Caution The Enterprise plan field is not set on the work package Details:
Please make sure that:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd21ec891b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bd21ec8 to
de1e33c
Compare
de1e33c to
d435975
Compare
d435975 to
48829cb
Compare
Adds the feature registry: each AI feature declares its kind, the capabilities it requires and whether administrators may override its model, following the FeatureDecisions idiom and living in lib_static for the same reload-safety reason. The AI models page then lets an administrator bind each registered feature to a model, fed by a query that never hides a model: an option is selectable, selectable with a warning when a required capability is unknown, or disabled with the reason when it is ruled out. Llm::Runtime is the single place a feature's model is resolved: explicit override, then binding, then the connection default, and otherwise unbound. It fails closed with a machine-readable reason rather than substituting another model, because a text transform with a different model is a different feature. Bindings reference models by identifier string, never by foreign key, so a binding survives its model disappearing and the dangling state is derived, not stored. With something to bind, the connection form gains the default embedding model selector, offering only models actually known to embed, and the destructive dialogs now name the features that would be affected. Part 10 of the AI-3 stack. https://community.openproject.org/work_packages/66020
48829cb to
426df28
Compare
|
Warning Flaky specs
🤖 Ask Copilot to investigateCopy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer. |
Ticket
AI-3
What are you trying to accomplish?
PR 10 of 11 in the AI-3 stack. Adds the feature registry (each AI feature declares its kind, required capabilities and whether its model may be overridden, following the FeatureDecisions idiom) and the AI models page that binds each registered feature to a model. Options are never hidden: a model is selectable, selectable with a warning when a required capability is unknown, or disabled with the reason when it is ruled out.
Llm::Runtimeis the single resolver (override, then binding, then connection default, otherwise unbound) and fails closed with a machine-readable reason rather than substituting another model. Bindings reference models by identifier string, never by foreign key, so they survive a model disappearing. This is the interface #77781 and #77783 consume.Merge checklist
llm_connectionfeature flagStacked on #24887.