Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apps/web/src/app/api/openrouter/[...path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,8 @@ export async function POST(request: NextRequest): Promise<NextResponseType<unkno
let routingTarget: string | null = null;
let classifierCostUsd = 0;
// Efficient/balanced requests resolve through the auto-routing pool. Kept for
// the org policy check below so a team that blocks every pool model gets
// guidance to configure a custom Efficient model pool instead of the generic
// model-not-allowed error.
// the org policy check below so a failed routing decision gets a specific
// auto-routing error instead of the generic model-not-allowed error.
let isAutoEfficientRequest = false;
if (isKiloAutoModel(requestedModelLowerCased)) {
autoModel = requestedModelLowerCased;
Expand Down
6 changes: 2 additions & 4 deletions apps/web/src/lib/ai-gateway/llm-proxy-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,8 @@ export function modelNotAllowedResponse() {
}

export function efficientPoolBlockedResponse() {
const error = 'Your organization blocks every model in the auto-routing pool.';
const message =
`${error} Configure a custom Efficient model pool with allowed models, ` +
`or adjust your organization model restrictions.`;
const error = 'Auto-routing could not select an eligible model for this request.';
const message = `${error} Please try again or contact support if the problem persists.`;
Comment thread
chrarnoldus marked this conversation as resolved.
const logMessage = `[efficientPoolBlockedResponse] ${message}`;
warnExceptInTest(logMessage);
return NextResponse.json(
Expand Down
Loading