Open
Conversation
- remove Backend field from Chat as it is contained in the AIModel
WithModel(AIModel) and WithModel<TModel> makes more questions than answers. It gives user one clear workflow. Add this flow with register as an example."
Contributor
|
Can changes be extended also for AgentContext? |
wisedev-pstach
previously approved these changes
Mar 12, 2026
- examples use const model ids instead of magic strings - add flux id (the approach in examples will be refactored)
Collaborator
Author
Applied the changes to the AgentContext. About the db changes... those changes are already made. If this isn't necessary I wouldn't reverse them. The next PR will aim to decouple Infrastructure from Services. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pr decouples
AIModelfrom theChatby removingModelInstanceproperty and relying on in-memory ModelRegistry. Removed Backend from the chat as well, as it is a model property not chat.Removed
WithModel(AIModel)andWithModel<TModel>()to standarize flow eg. register model -> use it, instead of implicitly creating it or registering without any warning. Due to ModelId constants (that I removed in recent PRs 🙃) the usage is nearly the same (with built-in or hardcoded model). Dynamicly loaded models have to be registered every time the aplication starts (added an exapmle how it works).Add
GenericImageGenerationCloudModelto enable dynamic cloud models to be created with correct interface. I am planning to switch from interfaces to dynamic dictionary<abaility, handler> to avoidGenericTTSImageGenerationReasoning...SomethingElseCloudModel.Breaking Changes:
WithModel(AIModel)andWithModel<TModel>()removed fromIChatBuilderEntryPoint. UseWithModel(string modelId)with constants fromModels.*or a registered model ID.WithBackend(BackendType)removed fromIChatConfigurationBuilder. Backend is now derived from the model - set it by choosing the appropriate model.Chat.BackendandChat.ModelInstanceproperties removed.