Skip to content

[ Gateway 7/10 ] Add Model select functionality for endpoint creation#19477

Merged
BenWilson2 merged 1 commit intomlflow:masterfrom
BenWilson2:stack/gateway-ui/model-select
Dec 23, 2025
Merged

[ Gateway 7/10 ] Add Model select functionality for endpoint creation#19477
BenWilson2 merged 1 commit intomlflow:masterfrom
BenWilson2:stack/gateway-ui/model-select

Conversation

@BenWilson2
Copy link
Member

@BenWilson2 BenWilson2 commented Dec 18, 2025

🥞 Stacked PR

Use this link to review incremental changes.


Related Issues/PRs

#xxx

What 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).
Screenshot 2025-12-17 at 10 21 24 PM

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How 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" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should 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?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

@BenWilson2 BenWilson2 force-pushed the stack/gateway-ui/model-select branch from 3a7950b to 9be931b Compare December 18, 2025 04:11
@BenWilson2 BenWilson2 changed the title WIP [ Gateway 7/10 ] Add Model select functionality for endpoint creation Dec 18, 2025
@BenWilson2 BenWilson2 marked this pull request as ready for review December 18, 2025 04:15
Copilot AI review requested due to automatic review settings December 18, 2025 04:15
@github-actions github-actions bot added area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/feature Mention under Features in Changelogs. labels Dec 18, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Documentation preview for ee5322f is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

@BenWilson2 BenWilson2 force-pushed the stack/gateway-ui/model-select branch 4 times, most recently from 44729af to 0385f8c Compare December 23, 2025 02:11
<div>
{selectedModel?.deprecation_date && (
<Typography.Text color="warning" css={{ display: 'flex', alignItems: 'center', gap: theme.spacing.xs }}>
<span>⚠</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we have a similar icon in databricks design system?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point - will use that

model: string;
provider: string;
supports_function_calling: boolean;
supports_vision?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this interface as "ProviderModel" to disambiguate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

@@ -0,0 +1,2 @@
export { LongFormSection, type LongFormSectionProps } from './LongFormSection';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to export this interface?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, will remove

Copy link
Collaborator

@TomeHirata TomeHirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once all comments are addressed!

* 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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use export const Abc() => ... for consistency.

const costTier = costTiers.get(model.model) || 1;
const contextWindow = formatTokens(model.max_input_tokens);

return (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this component is a bit too fat, can we define the row component as in a separate component file?

@BenWilson2 BenWilson2 force-pushed the stack/gateway-ui/model-select branch 2 times, most recently from 8789c4b to 8f8355c Compare December 23, 2025 16:52
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
@BenWilson2 BenWilson2 force-pushed the stack/gateway-ui/model-select branch from 8f8355c to ee5322f Compare December 23, 2025 18:02
@BenWilson2 BenWilson2 added this pull request to the merge queue Dec 23, 2025
Merged via the queue into mlflow:master with commit 61cc340 Dec 23, 2025
78 of 80 checks passed
@BenWilson2 BenWilson2 deleted the stack/gateway-ui/model-select branch December 23, 2025 20:47
@BenWilson2 BenWilson2 restored the stack/gateway-ui/model-select branch December 23, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uiux Front-end, user experience, plotting, JavaScript, JavaScript dev server rn/feature Mention under Features in Changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants