feat(copilot): enterprise configuration#3184
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR refactors copilot configuration to support enterprise deployments by moving model management from static frontend config to dynamic backend APIs. Key Changes:
Architecture Impact: Minor Concerns:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as Copilot UI
participant Store as Copilot Store
participant ModelsAPI as /api/copilot/models
participant ChatAPI as /api/copilot/chat
participant Backend as SIM Agent Backend
Note over UI,Store: Initialization Flow
UI->>Store: loadAvailableModels()
Store->>ModelsAPI: GET /api/copilot/models
ModelsAPI->>Backend: GET /api/get-available-models
Backend-->>ModelsAPI: {models: [{id, friendlyName, provider}]}
ModelsAPI-->>Store: {success: true, models: [...]}
Store->>Store: Transform to composite keys (provider/modelId)
Store->>Store: Select default model (anthropic/claude-opus-4-6)
Store-->>UI: Available models loaded
Note over UI,Backend: Chat Message Flow
UI->>Store: sendMessage(message)
Store->>Store: parseModelKey(selectedModel)
Store->>Store: Extract provider and modelId
Store->>ChatAPI: POST {message, model: modelId, provider}
ChatAPI->>Backend: POST /api/chat {model, provider, message}
Backend-->>ChatAPI: Stream response
ChatAPI-->>Store: SSE events
Store-->>UI: Update messages
Note over ChatAPI,Backend: Title Generation (First Message)
ChatAPI->>Backend: POST /api/generate-chat-title {message, model, provider}
Backend-->>ChatAPI: {title: "..."}
ChatAPI->>ChatAPI: Update chat title in DB
|
.../panel/components/copilot/components/user-input/components/model-selector/model-selector.tsx
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.
Summary
Enterprise support for copilot models
Type of Change
Testing
Tested with @icecrasher321
Checklist