Skip to content

feat(sidecar): add provider manifest client (port #6042) - #265

Merged
KooshaPari merged 1 commit into
mainfrom
port/sidecar-manifest-client
Jul 3, 2026
Merged

KooshaPari merged 1 commit into
mainfrom
port/sidecar-manifest-client

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Ports upstream diegosouzapw#6042 feat(sidecar): add provider manifest client as a self-contained follow-up.

What

Adds open-sse/config/providerPluginManifestClient.ts — an HTTP client for the read-only provider plugin manifest (GET /api/v1/provider-plugin-manifest, introduced by the manifest system in #253) so sidecars/relays discover providers over the network instead of hard-coding the route.

  • resolveProviderPluginManifestUrl — resolution order: explicit manifestUrl → OMNIROUTE_PROVIDER_MANIFEST_URL env → baseUrl → local OmniRoute API default (HOST/PORT).
  • fetchProviderPluginManifest — fetch + schemaVersion === 1 / providers array validation; throws on non-OK HTTP or malformed body.
  • getProviderPluginManifestEntryForModelFromManifest / fetchProviderPluginManifestEntryForModel — model→provider lookup by provider/ prefix, alias, then model id.

Files (3)

  • open-sse/config/providerPluginManifestClient.ts (new, 87 lines)
  • tests/unit/provider-plugin-manifest-client.test.ts (new, 5 tests)
  • docs/reference/PROVIDER_PLUGIN_MANIFEST.md (keep-both merge: retains the existing X-OmniRoute-Provider-Manifest-Url header-advertising paragraph AND adds the new client-usage guidance)

Excluded (branch-drift noise)

The upstream 3-dot diff carried two unrelated changes that do not belong to the sidecar client; both reverted to base:

  • tests/unit/translator-openai-responses-req.test.ts → -chat.test.ts rename (446-line translator test churn).
  • scripts/ci/should-promote-latest.sh (CI release-promotion regex hardening).

The upstream diff also touched route.ts, API_REFERENCE.md, stryker.conf.json, and the route test — those already match main (landed via the #253/#261 manifest system) so the patch was a no-op there.

Verification

  • node --import tsx/esm --test tests/unit/provider-plugin-manifest-client.test.ts → 5/5 pass.
  • npm run typecheck:core → clean (0 errors). Manifest type fields (id/alias/schemaVersion/models[].id) verified present on main — no fork divergence.

Port upstream diegosouzapw#6042. Adds an HTTP client for the read-only provider plugin
manifest so sidecars/relays discover providers over the network instead of
hard-coding the /api/v1/provider-plugin-manifest route.

- resolveProviderPluginManifestUrl: explicit manifestUrl > OMNIROUTE_PROVIDER_MANIFEST_URL env > baseUrl > local API default
- fetchProviderPluginManifest: fetch + schemaVersion 1 validation
- getProviderPluginManifestEntryForModelFromManifest / fetchProviderPluginManifestEntryForModel: model->provider lookup by prefix, alias, or model id

Excludes branch-drift noise from the upstream diff (translator responses test
rename, should-promote-latest.sh CI tweak) unrelated to the sidecar client.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb1f5ebc-b085-43a0-8620-9e6bd17af8d8

📥 Commits

Reviewing files that changed from the base of the PR and between 3d72e44 and 047e544.

📒 Files selected for processing (3)
  • docs/reference/PROVIDER_PLUGIN_MANIFEST.md
  • open-sse/config/providerPluginManifestClient.ts
  • tests/unit/provider-plugin-manifest-client.test.ts

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch port/sidecar-manifest-client

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 3, 2026

Copy link
Copy Markdown

L17 Latency Budget Report

--- Latency Budget Summary ---
  Total endpoints checked: 0
  Passed: 0
  Warnings: 0
  Failures: 0

Checked against: budgets/rest-endpoints.yaml.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

L17 Latency Regression Report

No trace file available — skipping latency regression comparison.

Threshold: 10% p99 regression.

@KooshaPari
KooshaPari merged commit 77d8939 into main Jul 3, 2026
67 of 73 checks passed
@KooshaPari
KooshaPari deleted the port/sidecar-manifest-client branch July 3, 2026 05:49
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@kilo-code-bot

kilo-code-bot Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 2
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

CRITICAL

File Line Issue
open-sse/config/providerPluginManifestClient.ts 6-7 Duplicate constants: PROVIDER_PLUGIN_MANIFEST_PATH and PROVIDER_PLUGIN_MANIFEST_ENV are already exported from providerPluginManifestUrl.ts line 2. This creates a naming conflict.
open-sse/config/providerPluginManifestClient.ts 17 Inconsistent regex: trimTrailingSlash uses /\/+$/ (removes all trailing slashes) vs existing /\/$/ in providerPluginManifestUrl.ts line 5. One removes all, one removes one.

WARNING

File Line Issue
open-sse/config/providerPluginManifestClient.ts 45-47 Missing timeout on fetch: Other HTTP clients in this codebase use AbortSignal.timeout() for safety; this client accepts optional signal but has no default timeout.
open-sse/config/ N/A Function naming collision: Both modules export resolveProviderPluginManifestUrl with different signatures (origin string vs options object).

SUGGESTION

File Line Issue
tests/unit/provider-plugin-manifest-client.test.ts 24-35 Test isolation: The test sets PROVIDER_PLUGIN_MANIFEST_ENV at line 25 but afterEach cleanup runs after each test. While the assertions themselves are correct, the env var should be cleaned up explicitly within the test for clearer isolation.
Files Reviewed (3 files)
  • open-sse/config/providerPluginManifestClient.ts - 2 CRITICAL issues
  • tests/unit/provider-plugin-manifest-client.test.ts - 1 SUGGESTION
  • docs/reference/PROVIDER_PLUGIN_MANIFEST.md - documentation update (clean)

Reviewed by laguna-m.1-20260312:free · Input: 255.3K · Output: 7.5K · Cached: 1.3M

ProviderPluginManifestEntry,
} from "./providerPluginManifest.ts";

export const PROVIDER_PLUGIN_MANIFEST_PATH = "/api/v1/provider-plugin-manifest";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Duplicate export - PROVIDER_PLUGIN_MANIFEST_PATH is already exported from providerPluginManifestUrl.ts line 2. Exporting the same constant from two modules creates ambiguity and potential for divergent values.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

} from "./providerPluginManifest.ts";

export const PROVIDER_PLUGIN_MANIFEST_PATH = "/api/v1/provider-plugin-manifest";
export const PROVIDER_PLUGIN_MANIFEST_ENV = "OMNIROUTE_PROVIDER_MANIFEST_URL";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Duplicate export - PROVIDER_PLUGIN_MANIFEST_ENV duplicates the env var name already used in providerPluginManifestUrl.ts. Consider importing and re-exporting instead.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

}

function trimTrailingSlash(value: string): string {
return value.replace(/\/+$/, "");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CRITICAL: Inconsistent regex behavior - trimTrailingSlash uses /\/+$/ (removes ALL trailing slashes) while providerPluginManifestUrl.ts line 5 uses /\/$/ (removes only ONE trailing slash). This will cause different URL normalization behavior depending on which module is used.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

): Promise<ProviderPluginManifest> {
const fetcher = options.fetchImpl ?? fetch;
const url = resolveProviderPluginManifestUrl(options);
const response = await fetcher(url, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Missing default timeout - HTTP fetch operations in this codebase typically use AbortSignal.timeout() (e.g., qoderCli.ts, claude-web.ts) to prevent indefinite hangs. Consider adding a default timeout when no signal is provided.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

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