Skip to content

fix(ai-gateway): enforce exclusive provider filters#4543

Open
chrarnoldus wants to merge 2 commits into
mainfrom
fix/ai-gateway-exclusive-provider-filtering
Open

fix(ai-gateway): enforce exclusive provider filters#4543
chrarnoldus wants to merge 2 commits into
mainfrom
fix/ai-gateway-exclusive-provider-filtering

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • enforce provider.only and provider.ignore for Kilo-exclusive model inference providers
  • apply request-level data collection restrictions after model routing is resolved
  • return a provider-not-allowed response when filtering excludes the exclusive provider

Validation

  • pnpm exec oxfmt --list-different apps/web/src/app/api/openrouter/[...path]/route.ts apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts
  • pnpm --filter web lint
  • pnpm --filter web typecheck
  • git diff --cached --check

@chrarnoldus chrarnoldus self-assigned this Jul 14, 2026
Comment thread apps/web/src/app/api/openrouter/[...path]/route.ts
Comment thread apps/web/src/app/api/openrouter/[...path]/route.ts
@kilo-code-bot

kilo-code-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/app/api/openrouter/[...path]/route.ts
Previous Review Summary (commit 1720cbe)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1720cbe)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

WARNING

File Line Issue
apps/web/src/app/api/openrouter/[...path]/route.ts 812 Organization and request data-collection opt-outs can be dropped
apps/web/src/app/api/openrouter/[...path]/route.ts 819 Caller provider filters can be overwritten before validation
Files Reviewed (2 files)
  • apps/web/src/app/api/openrouter/[...path]/route.ts - 2 issues
  • apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.6-sol · Input: 42K · Output: 6.3K · Cached: 162.9K

Review guidance: REVIEW.md from base branch main

@chrarnoldus chrarnoldus force-pushed the fix/ai-gateway-exclusive-provider-filtering branch from a098ea6 to 348c54a Compare July 14, 2026 19:46
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.

2 participants