feat(agents): first-class custom llm providers - #3137
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 7265429. Security Overview
Detected Code ChangesThe diff is too large to display a summary of code changes. |
There was a problem hiding this comment.
💡 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".
| const provider = await createCustomProvider({ requestBody: payload }) | ||
| await refreshCustomProviderCatalog({ providerId: provider.id }) |
There was a problem hiding this comment.
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 👍 / 👎.
| await updateCustomProvider({ | ||
| providerId: provider.id, | ||
| requestBody: buildProviderUpdatePayload(values), | ||
| }), |
There was a problem hiding this comment.
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 👍 / 👎.
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
typeto custom providers (generic_openai_compatible,litellm,ollama) for discovery and validation./v1.DiscoveredModelwith merged metadata.Migration
typecolumn; existing rows default togeneric_openai_compatible.Written for commit 7265429. Summary will update on new commits.