Skip to content

fix(ai-gateway): blind experiment response model ids#3464

Open
markijbema wants to merge 2 commits into
mainfrom
mark-model-experiment-client-blinding
Open

fix(ai-gateway): blind experiment response model ids#3464
markijbema wants to merge 2 commits into
mainfrom
mark-model-experiment-client-blinding

Conversation

@markijbema
Copy link
Copy Markdown
Contributor

@markijbema markijbema commented May 25, 2026

Summary

  • Rewrites experiment response model identifiers back to the requested public model id so variant checkpoint ids stay hidden from clients.
  • Covers chat completions and responses JSON/SSE paths, including a route-level check that outbound upstream traffic still uses the selected internal checkpoint id.

Verification

N/A - no manual API gateway environment was exercised for this backend-only response rewriting change.

Visual Changes

N/A

Reviewer Notes

Review focus: experiment-routed responses now share the existing free/stealth response rewrite helpers, including usage-cost stripping behavior.

@markijbema markijbema marked this pull request as ready for review May 25, 2026 13:14
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 25, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

All previously flagged issues have been resolved: the new commit adds both JSON and SSE test coverage for the rewriteFreeModelResponse_Messages experiment blinding path.

Resolved Issues
Previously Status
WARNING: rewriteFreeModelResponse_Messages had no test coverage for the experiment blinding path ✅ Fixed — two tests added (JSON and SSE variants) in rewriteModelResponse.test.ts
Files Reviewed (5 files)
  • apps/web/src/app/api/openrouter/[...path]/route.ts — no issues
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts — no issues
  • apps/web/src/lib/rewriteModelResponse.ts — no issues
  • apps/web/src/lib/rewriteModelResponse.test.ts — no issues (warning resolved by new commit)

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 174,035 tokens

Review guidance: REVIEW.md from base branch main

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