[Endpoints] [9/x] Add provider, model, and configuration handling#19009
[Endpoints] [9/x] Add provider, model, and configuration handling#19009BenWilson2 merged 1 commit intomlflow:masterfrom
Conversation
6a9292e to
4c0e39f
Compare
e176d7d to
00d7a50
Compare
00d7a50 to
de3bd35
Compare
85037f1 to
0526203
Compare
93c2b51 to
dca21ae
Compare
|
Documentation preview for 146bd37 is available at: More info
|
0bcf261 to
2546def
Compare
3c5d12d to
02deb34
Compare
@B-Step62 litellm responds with a list of all optional valid fields, but doesn't organize them into "these are the ones that are used together", hence the need to have the static mapping. It's not ideal, but it's better than having hard-mappings of all providers AND allows us to validate that the backend can support or not support a given provider (which is why for this version I surmised that allowing an editable connection configuration might be a bad idea for a random provider - a user wouldn't know until after having spent time configuring an endpoint that it's valid or not). For the static mapping, I figured that it would be less confusing to users if we provided the auth groupings that are required for these providers instead of a full list of "choose the ones you know you need" to reduce the cognitive load when creating an endpoint with a given selectable configuration. Open to hear some thoughts on alternatives here! |
@TomeHirata the config that we have in Gateway doesn't have the other fields that we want to use for UI to display for helper text / easily legible naming or information. They do contain the field mappings for validation, but I felt that it might be better to contain the full config for these special case providers in a single location (also didn't want to make a future deprecated portion of the code base linked to a new feature that would complicate cleanup in the future). |
f076132 to
dd53418
Compare
Understood. To share the context behind my question, we'll have two type of providers in our gateway: first tier support that MLflow owns schema unification, and second tier support that we'll use LiteLLM. For the first tier providers (openai, anthropic,...) we'll still reuse the existing gateway provider implementation and the per provider configuration should be consistent between the here and gateway provider implementation. Not a blocker, we can add more auth ways to the gateway implementation later. |
bc4092d to
728019d
Compare
TomeHirata
left a comment
There was a problem hiding this comment.
LGTM once this credential_name related question is solved!
728019d to
249b195
Compare
@BenWilson2 Hmm I'm still not following what is the intention of the current implementation.... according to the description you tried to add missing information (combination of optional fields), but if I read the logic of If I read the code correctly, what current implementation does is
Am I missing something? I don't see P.S. Re-read your comment above, it seems we are talking about different mapping. What I referred to is |
249b195 to
484ac23
Compare
WOW, yeah, I was 100% referring to the auth modes mapping. Sorry about that!
Having a 'safe fallback' is pointless and just is another vector for us to keep updated as new providers are added (or dropped). @B-Step62 thanks for refocusing my attention on this. I'm going to remove the typed dict entry and the fallback mapping as it provides zero value and actually actively makes maintenance harder. Thank you! |
3a3246b to
a73fbd3
Compare
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
a73fbd3 to
146bd37
Compare
| @@ -4110,9 +4110,11 @@ message CreateGatewaySecret { | |||
| optional string secret_value = 2; | |||
There was a problem hiding this comment.
@BenWilson2 I think we should update the schema for secret_value here to support arbitrary key-value pair?
| @@ -22,7 +22,6 @@ def create_secret( | |||
| secret_name: str, | |||
| secret_value: str, | |||
There was a problem hiding this comment.
@BenWilson2 I think we should update the type hint here to str | dict[str, str]?
🥞 Stacked PR
Use this link to review incremental changes.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Adds backend APIs for fetching providers, models from providers, and provider-specific configurations needed to fulfill a request. Adds a new dependency to the [genai] optional installation to support these backend APIs.
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.