Skip to content

Native Gemini routing for arbitrarily-named external endpoints: carry a profile key through chat params #63

Description

@wch

Follow-up to #61 (Databricks native APIs), which defers this.

Problem

Databricks native Gemini routing (google-generative protocol stamp) is restricted to endpoints whose name positively identifies the thinking variant (hosted pay-per-token names like databricks-gemini-2-5-pro). This is because ModelClientChatParams carries only model + thinkingEffort — at chat time, GeminiGenerateContentClient must re-derive the variant profile (budget vs level thinking control, ranges, off-ability) from the model string via ai-config's getGeminiGenerateContentProfile.

An external Gemini endpoint named e.g. my-gemini-endpoint backed by gemini-2.5-flash is classified correctly at discovery (the classifier sees external_model.name), but the client would have no way to reconstruct the variant from the endpoint name, so discovery deliberately stamps openai-chat instead (the classifier and client share one helper so stamp and wire choice cannot disagree).

Proposed direction

Widen the chat-params seam so the catalog pipeline can carry a discovery-time profile key (e.g. the resolved underlying model identity or a variant/profile id) into ModelClientChatParams. The client would prefer the carried key and fall back to name-derivation. Cross-repo change: bridge type plus catalog pipeline plumbing in consumers.

Scope notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions