[ Gateway 7/10 ] Add Model select functionality for endpoint creation#19477
Conversation
3a7950b to
9be931b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds model selection functionality for endpoint creation in the AI Gateway UI. The implementation includes:
- Revamped model selector modal with filtering, sorting, and custom model input
- Updated secret masking to support multi-key credentials (stored as JSON dict)
- Database schema changes to accommodate larger masked values (VARCHAR 100→500)
- New utility functions for formatting, provider management, and error handling
- Comprehensive test coverage for new hooks and utilities
Reviewed changes
Copilot reviewed 102 out of 107 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
mlflow/utils/crypto.py |
Refactored _mask_secret_value to return dict instead of string; split into _mask_string_value helper |
mlflow/store/tracking/dbmodels/models.py |
Updated masked_value column size to 500 chars; JSON serialization for dict values |
mlflow/store/tracking/gateway/sqlalchemy_mixin.py |
Simplified masking logic using updated _mask_secret_value function |
mlflow/entities/model_registry.py |
Changed GatewaySecretInfo.masked_value to masked_values (dict type) |
| Database schemas (sqlite, postgresql, mysql, mssql) | Increased masked_value VARCHAR size from 100 to 500 |
| Test files | Updated all tests to use masked_values dict format |
mlflow/server/js/src/gateway/utils/* |
New utility modules for formatters, error handling, dates, providers |
mlflow/server/js/src/gateway/hooks/* |
New React hooks for data fetching and state management |
mlflow/server/js/src/gateway/components/* |
New UI components for model selector, secrets, endpoints, navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Documentation preview for ee5322f is available at: More info
|
d2ea2f0 to
1c0b5e5
Compare
2d62a48 to
5b022d9
Compare
44729af to
0385f8c
Compare
| <div> | ||
| {selectedModel?.deprecation_date && ( | ||
| <Typography.Text color="warning" css={{ display: 'flex', alignItems: 'center', gap: theme.spacing.xs }}> | ||
| <span>⚠</span> |
There was a problem hiding this comment.
don't we have a similar icon in databricks design system?
There was a problem hiding this comment.
good point - will use that
| model: string; | ||
| provider: string; | ||
| supports_function_calling: boolean; | ||
| supports_vision?: boolean; |
There was a problem hiding this comment.
Can we call this interface as "ProviderModel" to disambiguate?
| @@ -0,0 +1,2 @@ | |||
| export { LongFormSection, type LongFormSectionProps } from './LongFormSection'; | |||
There was a problem hiding this comment.
We typically don't create index.ts just for re-exporting, so can we remove this file?
| import type { Model } from '../../types'; | ||
| import { formatTokens, sortModelsByDate } from '../../utils/formatters'; | ||
|
|
||
| export interface ModelSelectorModalProps { |
There was a problem hiding this comment.
do we need to export this interface?
| * By default, sections are separated by a horizontal divider at the bottom. | ||
| * Responsive: stacks vertically on narrow screens. | ||
| */ | ||
| export function LongFormSection({ title, titleWidth = 200, children, hideDivider = false }: LongFormSectionProps) { |
There was a problem hiding this comment.
Let's use export const Abc() => ... for consistency.
| const costTier = costTiers.get(model.model) || 1; | ||
| const contextWindow = formatTokens(model.max_input_tokens); | ||
|
|
||
| return ( |
There was a problem hiding this comment.
Since this component is a bit too fat, can we define the row component as in a separate component file?
8789c4b to
8f8355c
Compare
8f8355c to
ee5322f
Compare
🥞 Stacked PR
Use this link to review incremental changes.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Revamp of the model select modal. Formatting / component usage from design system changes, sorting capabilities based on semantic versioning rules and release date rules for provider models, add in the capacity to manually set a model (for passthrough / forward compatible capabilities as needed - AI Gateway requirement).
Also applied fixes to the Icon / naming conditions now that most main pages are present in the stack (earlier PRs had placeholders for these so that all changes can be done once).

How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.