fix: 스크린샷 분석(Vision) 모델을 gemini-3.5-flash 로 바꾼다
gemini-2.0-flash 는 Google 이 내려 404 를 돌려주고 있었다(2026-10-07 확인). 분석이 조용히 빈 결과로 끝나던 상태다. 새 Gemini 키(서비스 계정 바인딩) 프로젝트에서도 호출되는 3.5-flash 로 바꾸고, 내부 추론 토큰을 감안해 출력 한도를 4096 으로 올린다. 운영 collect-channel-data v24 로 배포(운영 index.ts 는 로컬과 달라 운영 소스에 이 파일만 바꿔 배포), Supabase GEMINI_API_KEY 는 새 키로 교체. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
13d44ddabc
commit
60f828cce0
@ -387,7 +387,7 @@ export async function analyzeScreenshot(
|
|||||||
try {
|
try {
|
||||||
console.log(`[vision] Analyzing screenshot: ${pageType} (${Math.round(base64.length / 1024)}KB)`);
|
console.log(`[vision] Analyzing screenshot: ${pageType} (${Math.round(base64.length / 1024)}KB)`);
|
||||||
const res = await fetchWithRetry(
|
const res = await fetchWithRetry(
|
||||||
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${geminiKey}`,
|
`https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent?key=${geminiKey}`,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
@ -399,8 +399,10 @@ export async function analyzeScreenshot(
|
|||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
generationConfig: {
|
generationConfig: {
|
||||||
|
// gemini-2.0-flash 는 Google 이 내려 404 다 (2026-10-07 확인). 3.5-flash 는 답 전에 내부 추론 토큰(약 550)을 쓰고
|
||||||
|
// 그것도 출력 한도에 들어가므로 JSON 이 잘리지 않게 한도를 넉넉히 둔다.
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
maxOutputTokens: 2048,
|
maxOutputTokens: 4096,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user