Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates BYOK (custom model) handling so model selection can be disambiguated by a unique custom model ID (instead of slug), and adds a saving/loading UX to the API key settings editor.
Changes:
- Add
id+custom_model_idto the chat v2 API (proto + generated clients) and threadcustomModelIdthrough the webapp stream request builder. - Update model picker wiring to support selecting custom models by ID (while still displaying slug).
- Add an
isSavingstate to the BYOK settings UI to disable inputs and show a spinner during save/edit.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| webapp/_webapp/src/views/settings/sections/api-key-settings.tsx | Adds isSaving state and disables inputs/buttons + spinner during save/edit. |
| webapp/_webapp/src/views/chat/footer/toolbar/selection.tsx | Extends SelectionItem to optionally carry id/isCustom. |
| webapp/_webapp/src/views/chat/footer/toolbar/model-selection.tsx | Passes custom model id/isCustom into selection items and selects custom models by ID. |
| webapp/_webapp/src/utils/stream-request-builder.ts | Adds customModelId into the stream request payload. |
| webapp/_webapp/src/stores/setting-store.ts | Initializes default settings to include customModels: []. |
| webapp/_webapp/src/stores/conversation/conversation-ui-store.ts | Persists lastUsedCustomModelId in UI state. |
| webapp/_webapp/src/hooks/useSendMessageStream.ts | Threads lastUsedCustomModelId into stream requests. |
| webapp/_webapp/src/hooks/useLanguageModels.ts | Maps SupportedModel.id into UI models and prefers selecting custom models by ID. |
| proto/chat/v2/chat.proto | Adds SupportedModel.id and CreateConversationMessageStreamRequest.custom_model_id. |
| pkg/gen/api/chat/v2/chat.pb.go | Regenerates Go protobuf types for the new fields. |
| webapp/_webapp/src/pkg/gen/apiclient/chat/v2/chat_pb.ts | Regenerates TS protobuf types for the new fields. |
| internal/api/chat/list_supported_models_v2.go | Populates SupportedModel.id for custom models. |
| internal/api/chat/create_conversation_message_stream_v2.go | Resolves custom models by custom_model_id instead of slug. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
webapp/_webapp/src/views/settings/sections/api-key-settings.tsx
Outdated
Show resolved
Hide resolved
webapp/_webapp/src/views/chat/footer/toolbar/model-selection.tsx
Outdated
Show resolved
Hide resolved
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.
Key changes: