File tree Expand file tree Collapse file tree
apps/web/src/lib/ai-gateway/providers/vercel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { VERCEL_ROUTING_REDIS_KEY } from '@/lib/redis-keys';
2424import { getRandomNumber } from '@/lib/ai-gateway/getRandomNumber' ;
2525import { getVercelModels } from '@/lib/ai-gateway/providers/gateway-models-cache' ;
2626import type { AnthropicProviderOptions } from '@ai-sdk/anthropic' ;
27+ import { isFableModel } from '@/lib/ai-gateway/providers/anthropic.constants' ;
2728
2829const getVercelRoutingPercentage = createCachedFetch (
2930 async ( ) => {
@@ -55,6 +56,13 @@ export async function shouldRouteToVercel(
5556 return false ;
5657 }
5758
59+ if ( isFableModel ( requestedModel ) ) {
60+ console . debug (
61+ "[shouldRouteToVercel] not routing to Vercel because the Fable->Opus fallback doesn't seem to work"
62+ ) ;
63+ return false ;
64+ }
65+
5866 console . debug ( '[shouldRouteToVercel] randomizing user to either OpenRouter or Vercel' ) ;
5967 const [ routingPercentage , vercelModels ] = await Promise . all ( [
6068 getVercelRoutingPercentage ( ) ,
You can’t perform that action at this time.
0 commit comments