feat: add default models for agents - #3502
Draft
ekim1707 wants to merge 3 commits into
Draft
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
ekim1707
marked this pull request as draft
July 30, 2026 16:50
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.
Description
Facilitate default models being assigned to agents. This PR requires a corresponding PR from elsa-beta for full implementation.
Changes Made
new-room-page.tsx — Calls getWorkspace and sets the agent's default model if configured. Restores user's default model if agent is unselected.
types.d.ts — Added config_json?: { model_id?: string } to the Workspace interface. This exposes the backend-returned
field that holds the default model engine ID for a workspace, which is used to hydrate the dropdown when opening the
edit form or agent detail page.
chat.store.ts — Added the modelId?: string | null parameter to editWorkspace and updated the pixel string to
conditionally include modelId in the call. When modelId is null it sends modelId="" to clear it on the backend; when
undefined (not passed at all) it omits modelId entirely to leave it unchanged.
How to Test
Then test: