Skip to content

feat(agents): first-class custom llm providers - #3137

Open
jordan-umusu wants to merge 1 commit into
mainfrom
feat/custom-model-provider-flavors
Open

feat(agents): first-class custom llm providers#3137
jordan-umusu wants to merge 1 commit into
mainfrom
feat/custom-model-provider-flavors

Conversation

@jordan-umusu

@jordan-umusu jordan-umusu commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary by cubic

Adds first‑class custom LLM providers with an explicit type, a new UI wizard, and type‑aware discovery/validation. Also adds robust Ollama handling and makes model access enabling idempotent.

  • New Features

    • Added type to custom providers (generic_openai_compatible, litellm, ollama) for discovery and validation.
    • New provider wizard and dialog with type‑aware fields, connection validation, and catalog refresh.
    • Gateway sanitizes Ollama requests (flattens message content, drops reasoning artifacts) and ensures a single /v1.
    • Catalog discovery now returns structured DiscoveredModel with merged metadata.
    • LiteLLM icon and type‑specific defaults (e.g., credentials optional for Ollama).
  • Migration

    • Run DB migrations to add the type column; existing rows default to generic_openai_compatible.
    • No breaking changes; model access enabling is now idempotent.

Written for commit 7265429. Summary will update on new commits.

Review in cubic

@jordan-umusu
jordan-umusu marked this pull request as ready for review July 27, 2026 20:33
@zeropath-ai

zeropath-ai Bot commented Jul 27, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 7265429.

Security Overview
Detected Code Changes

The diff is too large to display a summary of code changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72654296f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +205 to +206
const provider = await createCustomProvider({ requestBody: payload })
await refreshCustomProviderCatalog({ providerId: provider.id })

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Roll back providers when wizard setup does not finish

Once validation succeeds, this persists the provider before catalog refresh and before the user clicks Finish. If refresh/polling fails, the dialog is dismissed during the mutation, or the user closes it after a successful test, no cleanup runs; createdProvider is only set after the whole mutation succeeds, so failures and cancellations leave hidden or duplicate provider rows behind. Delete the newly created row on failure/cancellation, or defer persistence until Finish.

Useful? React with 👍 / 👎.

Comment on lines +93 to +96
await updateCustomProvider({
providerId: provider.id,
requestBody: buildProviderUpdatePayload(values),
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh the catalog after changing a provider type

When an existing source is changed between generic, LiteLLM, and Ollama, saving only updates the provider row and closes the dialog. Its catalog therefore continues to contain models discovered with the previous type and endpoint semantics until the user separately selects Refresh, despite the dialog promising that changing the type or base URL reruns discovery; those stale rows can remain selectable and fail at runtime. Trigger catalog refresh after the update, at least when type or base_url changes.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant