Skip to content

Commit 577d166

Browse files
authored
Merge pull request #3505 from trycompai/main
[comp] Production Deploy
2 parents bec2746 + ce4a59c commit 577d166

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

‎apps/app/src/app/(app)/[orgId]/tasks/[taskId]/automation/[automationId]/components/workflow/workflow-visualizer-simple.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Please fix the automation script to resolve this error.`;
229229
{ text: errorMessage },
230230
{
231231
body: {
232-
modelId: 'google/gemini-3.1-flash-lite-preview',
232+
modelId: 'google/gemini-3.1-flash-lite',
233233
reasoningEffort: 'high',
234234
orgId,
235235
taskId,

‎apps/app/src/app/(app)/[orgId]/tasks/[taskId]/automation/[automationId]/hooks/use-chat-handlers.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export function useChatHandlers({
7474
{ text },
7575
{
7676
body: {
77-
modelId: 'google/gemini-3.1-flash-lite-preview',
77+
modelId: 'google/gemini-3.1-flash-lite',
7878
reasoningEffort: 'high',
7979
orgId,
8080
taskId,
@@ -96,7 +96,7 @@ export function useChatHandlers({
9696
},
9797
{
9898
body: {
99-
modelId: 'google/gemini-3.1-flash-lite-preview',
99+
modelId: 'google/gemini-3.1-flash-lite',
100100
reasoningEffort: 'high',
101101
orgId,
102102
taskId,
@@ -120,7 +120,7 @@ export function useChatHandlers({
120120
},
121121
{
122122
body: {
123-
modelId: 'google/gemini-3.1-flash-lite-preview',
123+
modelId: 'google/gemini-3.1-flash-lite',
124124
reasoningEffort: 'high',
125125
orgId,
126126
taskId,

‎apps/app/src/lib/rerank-suggestions.spec.ts‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ describe('rerankSuggestions', () => {
8080
expect(byId.tsk_c).toBe(0);
8181
});
8282

83+
// Regression: the reranker was pinned to `google/gemini-3.1-flash-lite-preview`. The
84+
// gateway retires `-preview` aliases on GA, so every call 404'd — and because both
85+
// callers in run-linkage.ts catch and fall back to cosine, nothing surfaced the failure.
86+
it('requests a GA model slug, never a -preview alias', async () => {
87+
generateObjectMock.mockResolvedValueOnce({ object: { scores: [] } });
88+
89+
await rerankSuggestions({
90+
source: { kind: 'risk', title: 't', description: 'd' },
91+
candidates: [{ id: 'tsk_a', title: 'A', description: 'a', cosineScore: 0.5 }],
92+
});
93+
94+
const { model } = generateObjectMock.mock.calls[0][0];
95+
expect(model.modelId).toBe('google/gemini-3.1-flash-lite');
96+
expect(model.modelId).not.toMatch(/-preview$/);
97+
});
98+
8399
it('assigns 0 to candidates the LLM omits', async () => {
84100
generateObjectMock.mockResolvedValueOnce({
85101
object: { scores: [{ id: 'tsk_a', score: 8 }] },

‎apps/app/src/lib/rerank-suggestions.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ const gateway = createGatewayProvider({
4343
baseURL: process.env.AI_GATEWAY_BASE_URL,
4444
});
4545

46-
const RERANK_MODEL = 'google/gemini-3.1-flash-lite-preview' as const;
46+
/**
47+
* GA slug. Never pin a `-preview` alias here: the gateway retires it once the model
48+
* goes GA, and every rerank call then 404s. Both callers in `run-linkage.ts` swallow that
49+
* into a cosine-only fallback, so the failure is silent — suggestion quality just degrades.
50+
*/
51+
const RERANK_MODEL = 'google/gemini-3.1-flash-lite' as const;
4752

4853
const SYSTEM_PROMPT = `You are a GRC analyst evaluating which compliance tasks would meaningfully reduce a specific risk or vendor exposure.
4954

0 commit comments

Comments
 (0)