-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add AI model aliases and default models #15782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7b55b3b
to
fc65afb
Compare
57abfe7
to
6e6566d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not work for me. When testing on latest master
, Theia AI works as expected. When I start from this PR, then all models are gone.
There are a lot of errors in the console which are likely the cause of this:
ERROR Error: You are attempting to construct Symbol(AnthropicLanguageModelsManager) in a synchronous way but it has asynchronous dependencies.
ERROR Error: You are attempting to construct Symbol(LanguageModelRegistryFrontendDelegate) in a synchronous way but it has asynchronous dependencies.
[...]
ERROR Uncaught Exception: Error: No matching bindings found for serviceIdentifier: Symbol(LanguageModelAliasRegistry)
Trying to resolve bindings for "BackendLanguageModelRegistry"
ERROR Error: No matching bindings found for serviceIdentifier: Symbol(LanguageModelAliasRegistry)
packages/ai-ide/src/browser/ai-configuration/language-model-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
packages/ai-openai/src/node/openai-language-models-manager-impl.ts
Outdated
Show resolved
Hide resolved
143fcc7
to
c81c0f2
Compare
@sdirix Thanks for the feedback. I incorporated most of it and also fixed the regression you reported. I added comments on two of your suggestions. Could you take another look? |
packages/ai-openai/src/browser/openai-frontend-application-contribution.ts
Outdated
Show resolved
Hide resolved
6337ccd
to
bcabb50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the functionality works. However regarding UX and feature set there are quite a lot of things to be improved.
packages/ai-ide/src/browser/ai-configuration/language-model-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/language-model-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Show resolved
Hide resolved
bee21fe
to
393c0f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me! I only have minor comments left. Feel free to tackle them here or log them as follow ups
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/language-model-renderer.tsx
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/language-model-renderer.tsx
Outdated
Show resolved
Hide resolved
packages/ai-ide/src/browser/ai-configuration/model-aliases-configuration-widget.tsx
Outdated
Show resolved
Hide resolved
@JonasHelming Could you go over the proposed aliases here and adjust which ones should be available, which models they should reference and the description. And then change the default model of the agents to a suitable alias and just add this as an commit on this PR? |
I would go:
|
fc13df6
to
184753b
Compare
Initial implementation of #15395 Introduces support for AI model aliases to facilitate updating many agents' used models at once. An alias either points to a single model selected by the user or a chain of default/fallback models to consider in priority order. For the fallback chain, the first ready model (e.g. has an API key configured) is used. For this the language model was extended with a status to be set by its manager. - Introduces a language model alias registry for registering and retrieving model aliases and chains - Adds support for chains of default model aliases (`code`, `universal`, `code completion`, `summarize`) - Selects the first available model (with an API key) from the chain when resolving an alias; falls back to the first in the chain if none are ready - Enables users to point an alias to use a specific model - Extends language models to track readiness (e.g., whether an API key is set) - Adds a new Model Aliases tab to the the AI configuration UI to: - Display alias chains - Select a mode for an alias Signed-off-by: Simon Graband <sgraband@eclipsesource.com> Co-authored-by: Lucas Koehler <lkoehler@eclipsesource.com> Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
184753b
to
cc13d53
Compare
@JonasHelming could you take a look at the assignment between agents and aliases? Best to just delete your @sdirix Could you take a look at the changes of this commit? This was needed to properly render the agents using this alias if the setting was not set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted all my ai-feature preferences and the tool worked as expected
Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Previously the alias would not be associated with the agent if the setting was empty. Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
cc13d53
to
93a56e5
Compare
@sgraband The follow up section above mentions: "Configure aliases as default models for agents" => isn't this done? |
Yes. Since i already created a follow-up. I did not update this further. |
Initial implementation of eclipse-theia#15395 Introduces support for AI model aliases to facilitate updating many agents' used models at once. An alias either points to a single model selected by the user or a chain of default/fallback models to consider in priority order. For the fallback chain, the first ready model (e.g. has an API key configured) is used. For this the language model was extended with a status to be set by its manager. - Introduces a language model alias registry for registering and retrieving model aliases and chains - Adds support for chains of default model aliases (`code`, `universal`, `code completion`, `summarize`) - Selects the first available model (with an API key) from the chain when resolving an alias; falls back to the first in the chain if none are ready - Enables users to point an alias to use a specific model - Extends language models to track readiness (e.g., whether an API key is set) - Adds a new Model Aliases tab to the the AI configuration UI to: - Display alias chains - Select a mode for an alias Signed-off-by: Simon Graband <sgraband@eclipsesource.com> Co-authored-by: Simon Graband <sgraband@eclipsesource.com> Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
What it does
Initial implementation of #15395
Introduces support for AI model aliases to facilitate updating many agents' used models at once.
An alias either points to a single model selected by the user or a chain of default/fallback models to consider in priority order.
For the fallback chain, the first ready model (e.g. has an API key configured) is used. For this the language model was extended with a status to be set by its manager.
code
,universal
,code completion
,summarize
)How to test
Follow-ups
Render Agents using an alias in alias view (@sgraband has a WIP implementation)Show resolved model for an alias in alias config view and in agent config viewDisplay in chain the ones that are ready and the one that is chosen (only if applicable)Breaking changes
Review checklist
Reminder for reviewers