Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the changes restricting chat options and API examples to supported model types.
No open issues 🎉
What changed in this PR
This PR filters non-chat models from the chat picker and hides their Chat action on Active Models cards. It also prevents the public API dialog from showing chat-completions examples for unsupported model types.
Changes:
- Centralizes chat-capability checks for
LLM,VLM, and models with no declared type. - Filters chat deployment options and displays an unavailable-examples message for unsupported API types.
- Adds unit coverage for model filtering, Chat button visibility, and endpoint selection.
| File | Description |
|---|---|
frontend/tests/unit/public-api-snippets.test.ts |
Tests unsupported endpoint selection for reward models. |
frontend/tests/unit/chat-models-route.test.ts |
Tests exclusion of non-chat deployments. |
frontend/tests/unit/active-model-card.test.tsx |
Tests Chat button visibility by model type. |
frontend/lib/public-api-snippets.ts |
Returns no endpoint for unsupported model types. |
frontend/lib/models/types.ts |
Adds the shared chat-capability helper. |
frontend/components/public-api-dialog.tsx |
Handles unsupported endpoints without showing request examples. |
frontend/components/model-card/active-model-card.tsx |
Shows Chat only for chat-capable models. |
frontend/app/api/chat/models/route.ts |
Filters deployments using catalog model types. |
CHANGELOG.md |
Documents filtering, dialog behavior, and test coverage. |
Review effort: Balanced
This branch has not been deployed
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.
filter non-chat models in chat page
have public api dialog box hide chat button for non-chat models.
Tested by running the backend and frontend in local. Added non-chat models to ModelDeployment table and tested if the chat button shows up and if the api dialogue box is populated correctly.