Skip to content

feat(api/proxy/dashboard): device tracking + Webshare pool + basePath + HF Hub media - #236

Merged
KooshaPari merged 4 commits into
mainfrom
port/bundle-c
Jul 3, 2026
Merged

KooshaPari merged 4 commits into
mainfrom
port/bundle-c

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Consolidated port of four upstream diegosouzapw/OmniRoute PRs into the KooshaPari fork. Each is a self-contained commit; all applied cleanly (only CHANGELOG required manual reconciliation).

Ported PRs

Verification

  • npm run typecheck:core — clean.
  • New/ported unit tests pass (87 across device-tracker, webshare-sync, hf-model-suggestions, suggested-models-route, free-proxy-providers, authz/pipeline).
  • New routes (/api/keys/[id]/devices, /api/v1/providers/suggested-models) are read-only GETs — no child-process spawn, no isLocalOnlyPath() classification required.
  • src/lib/localDb.ts change is re-export only (pruneStaleFreeProxies) — Hard Rule chore: bootstrap .trufflehog.yml secrets scanning #2 compliant.

KooshaPari and others added 4 commits July 2, 2026 20:19
…gosouzapw#5992)

Ports diegosouzapw#5992.

Co-authored-by: SillyHippy <SillyHippy@users.noreply.github.com>
…osouzapw#5998)

Ports diegosouzapw#5998.

Co-authored-by: mugnimaestra <mugnimaestra@users.noreply.github.com>
…ouzapw#5993)

Ports diegosouzapw#5993.

Co-authored-by: ricatix <ricatix@users.noreply.github.com>
…souzapw#5990)

Ports diegosouzapw#5990.

Co-authored-by: yicone <yicone@users.noreply.github.com>
@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!

@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: 23 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: 554b2ee4-928a-4a82-b1cc-3e2e11c36360

📥 Commits

Reviewing files that changed from the base of the PR and between 98ed28a and 79ef889.

📒 Files selected for processing (29)
  • .env.example
  • CHANGELOG.md
  • docs/reference/ENVIRONMENT.md
  • next.config.mjs
  • open-sse/config/imageRegistry.ts
  • open-sse/handlers/chatCore.ts
  • open-sse/handlers/imageGeneration.ts
  • open-sse/handlers/imageGeneration/providers/huggingface.ts
  • open-sse/services/deviceTracker.ts
  • open-sse/services/hfModelSuggestions.ts
  • src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx
  • src/app/(dashboard)/dashboard/media-providers/components/ImageExampleCard.tsx
  • src/app/(dashboard)/dashboard/settings/components/proxy/SourceToggleBar.tsx
  • src/app/api/keys/[id]/devices/route.ts
  • src/app/api/v1/providers/suggested-models/route.ts
  • src/i18n/messages/en.json
  • src/lib/db/freeProxies.ts
  • src/lib/freeProxyProviders/index.ts
  • src/lib/freeProxyProviders/types.ts
  • src/lib/freeProxyProviders/webshare.ts
  • src/lib/localDb.ts
  • src/server/authz/pipeline.ts
  • src/shared/validation/freeProxySchemas.ts
  • tests/unit/authz/pipeline.test.ts
  • tests/unit/device-tracker.test.ts
  • tests/unit/free-proxy-providers.test.ts
  • tests/unit/hf-model-suggestions.test.ts
  • tests/unit/suggested-models-route.test.ts
  • tests/unit/webshare-sync.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/bundle-c

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.

@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: 79ef889e8b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const staticModelOptions = models.length > 0 ? models : [{ id: "dall-e-3" }];
const knownModelIds = new Set(staticModelOptions.map((m) => m.id));
const suggestedOnly = suggestedModels.filter((m) => !knownModelIds.has(m.id));
const modelOptions = [...staticModelOptions, ...suggestedOnly.map((m) => ({ id: m.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 Prefix suggested HuggingFace model IDs

When the HuggingFace image page adds suggestions as bare Hub repo IDs (for example black-forest-labs/FLUX.1-dev), the generated request body contains that bare value. The image route's parseImageModel checks provider prefixes first, so black-forest-labs/... is routed to the Black Forest Labs provider/credentials instead of the HuggingFace provider; selecting these suggestions will fail or hit the wrong upstream. Keep the displayed label bare if desired, but submit huggingface/${m.id} or otherwise preserve the provider context.

Useful? React with 👍 / 👎.

Comment on lines +105 to +109
const item: FreeProxyItem = {
source: "webshare",
host: p.proxy_address,
port: p.port,
type: "http",

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 Preserve Webshare proxy credentials when importing

For Webshare accounts using username/password direct authentication, the proxy-list API returns credentials alongside proxy_address and port, but this import only persists host/port/type. Later promotion into proxy_registry writes empty username/password for free-proxy rows, so these Webshare proxies will be unusable unless the operator has separately configured source-IP authorization. Capture and store the returned credentials, or gate this provider to IP-authorized accounts.

Useful? React with 👍 / 👎.

Comment on lines +129 to +130
if (errors.length === 0 && fetched > 0) {
await pruneStaleFreeProxies("webshare", activeKeys);

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 Prune stale Webshare rows after an empty sync

When Webshare returns a successful empty first page, such as after all proxies were removed or the plan is empty, this guard skips pruning because fetched is zero. That leaves previously imported, not-in-pool Webshare rows visible as candidates even though the latest account list contains none. Since this branch is not a fetch failure, treat an error-free empty sync as authoritative and prune against the empty activeKeys set.

Useful? React with 👍 / 👎.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@KooshaPari
KooshaPari merged commit 72fdb48 into main Jul 3, 2026
155 of 172 checks passed
@KooshaPari
KooshaPari deleted the port/bundle-c branch July 3, 2026 04:02
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