Skip to content

feat(frontend): OpenAI-compatible endpoint label and harness-gated picker#5346

Merged
mmabrouk merged 2 commits into
release/v0.105.4from
feat/pi-openai-compatible-ui
Jul 17, 2026
Merged

feat(frontend): OpenAI-compatible endpoint label and harness-gated picker#5346
mmabrouk merged 2 commits into
release/v0.105.4from
feat/pi-openai-compatible-ui

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

feat(frontend): OpenAI-compatible endpoint label and harness-gated picker

Context

The vault provider kind custom was labeled "Custom provider" in the settings and connection
forms. The name did not say what the kind is: a single-key OpenAI-compatible Chat Completions
endpoint at a base URL you name. Selecting a custom connection also did not set a provider family,
so a bare model from a custom connection could carry over whatever provider was selected before it.

This change relabels the kind and makes the picker pick the right family. It pairs with the backend
change that lets these connections run on Pi.

Changes

The custom provider-kind label now reads "OpenAI-compatible endpoint". The stored value is
unchanged; only the display string moves.

Selecting a custom connection defaults the provider family to openai and preserves the connection
slug. Selecting an explicitly family-qualified model keeps that family. Switching from an unrelated
prior provider no longer leaks the prior provider into the new custom selection.

The picker is harness-gated. Custom vault models appear only where the harness reaches them. Pi
shows compatible custom connections when its custom deployment is enabled; Claude does not show an
OpenAI-compatible bare-model connection. Existing explicit Anthropic gateway behavior is unchanged.

Before: PROVIDER_LABELS.custom rendered "Custom provider", and a custom selection could submit the
previously selected provider. After: it renders "OpenAI-compatible endpoint", and a bare-model
custom selection writes provider openai with the exact slug.

Scope / risk

  • The change is display and picker logic only. Stored and submitted kind stays custom.
  • Custom entries stay hidden until the backend capability ships, because the picker is gated on the
    harness deployment set. This PR should merge after or with the backend PR
    (feat(agents): OpenAI-compatible endpoints for Pi via vault custom connections). Merged alone,
    the label changes but no new connection can run.
  • The Playwright model-hub.ts strings are updated to match the new label. A live Playwright run is
    still outstanding (tracked in the project open-issues log).

How to QA

  1. Open the model-hub settings. The provider kind previously shown as "Custom provider" now reads
    "OpenAI-compatible endpoint". The connection you already have is unchanged.
  2. Create or edit a custom connection, then pick it and a bare model for a Pi agent. Expected: the
    provider resolves to openai and the connection slug is preserved in the submitted config.
  3. Switch a selection from an unrelated provider to a custom connection. Expected: the new selection
    does not carry the old provider.
  4. Regression, Claude: open the picker for a Claude template. Expected: an OpenAI-compatible
    bare-model connection does not appear; an existing Anthropic gateway still does.

Test command:

cd web/packages/agenta-entity-ui && pnpm exec vitest run

Evidence: entity-ui suite 208 passed. The manual UI click-through passed on the EE dev stack
(2026-07-14 and 2026-07-15).

https://claude.ai/code/session_01AYBi6cYuQCR87dAD3ZdPWc

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. Frontend labels Jul 16, 2026
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 17, 2026 10:53pm

Request Review

@mmabrouk

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8183d35e-882b-4352-b7b3-4446b9d5d7f4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR renames the custom provider to “OpenAI-compatible endpoint” across the UI and tests, maps custom deployments to the OpenAI provider family, tightens capability gating, and adds unit coverage for filtering and model-reference composition.

Changes

Custom provider flow

Layer / File(s) Summary
OpenAI-compatible provider labels
web/oss/src/components/pages/settings/Secrets/SecretProviderTable/index.tsx, web/packages/agenta-entities/src/secret/core/types.ts, web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ProviderCredentialsSection.tsx, web/oss/tests/playwright/acceptance/settings/model-hub.ts
Custom-provider labels and corresponding Playwright selectors now use “OpenAI-compatible endpoint”.
Custom deployment resolution
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/connectionUtils.ts
Custom deployments resolve to the openai provider family and require harness access to both the custom deployment and openai family.
Connection filtering and model composition tests
web/packages/agenta-entity-ui/tests/unit/connectionUtils.test.ts
Tests cover capability gating, missing capabilities, non-custom regressions, provider-family defaults, and composed model references.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main frontend change: relabeling custom providers and gating the picker by harness capability.
Description check ✅ Passed The description is clearly related to the changeset and explains the label, picker, and gating updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pi-openai-compatible-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-07-17T22:55:35.950Z

@mmabrouk
mmabrouk changed the base branch from main to release/v0.105.4 July 17, 2026 22:01
@mmabrouk

Copy link
Copy Markdown
Member Author

Release v0.105.4 assembly note — held, needs a one-file fix

Retargeted this PR's base to release/v0.105.4. It is not merged yet: tests / run-web-tests (acceptance) fails deterministically with 12 failures (across observability, playground, and settings/model-hub), and they are caused by this PR's own diff.

Root cause — one stale shared fixture. Every one of the 12 failures dies in the same precondition helper:

getCustomProvidersSection(page)  ->  page.getByText("Custom Provider", { exact: true })
  web/tests/tests/fixtures/base.fixture/providerHelpers/index.ts:187 / :195
  Error: expect(locator).toBeVisible() — element(s) not found (15s timeout)

This PR renames/restructures the "Custom Provider" section label in SecretProviderTable/index.tsx and ProviderCredentialsSection.tsx, and it updates its own test (model-hub.ts), but it does not update the shared fixture providerHelpers/index.ts, which still matches the old exact text. Because that fixture gates the observability, playground, and model-hub scopes, one stale locator takes down all 12 tests.

Fix: update web/tests/tests/fixtures/base.fixture/providerHelpers/index.ts to the new label — the getCustomProvidersSection locator (:195) and the getByRole("button", { name: "Custom Provider" }) at :149 — to match the renamed section. After that the suite should pass and this can merge into release/v0.105.4.

Note: base branch release/v0.105.4 already contains #5345 (backend), #5364, #5366, and main (incl. #5362).

@mmabrouk
mmabrouk force-pushed the feat/pi-openai-compatible-ui branch from c27bc9d to 5b047bc Compare July 17, 2026 22:52
@mmabrouk
mmabrouk merged commit 5824473 into release/v0.105.4 Jul 17, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant