본문 바로가기
Q&A2026년 6월 3일1분 읽기

Anthropic Claude 4.9 + extended thinking — production에서 응답이 5초로 늘었어요

양
양시우
조회 749댓글 5

Claude 4.9로 업그레이드 후 production 챗봇 응답이 가끔 5초로 늘었습니다. 평소 0.8s.

로그 분석 — 응답 시간 5초인 호출은 모두 extended thinking 토큰 4,000+ 사용. 사용자 질문은 단순한 인사 "안녕하세요" 같은 것도 가끔.

"안녕하세요"에 thinking 4,000 토큰... 어떻게 끄나요?

const response = await anthropic.messages.create({
  model: 'claude-sonnet-4-9',
  max_tokens: 1024,
  messages: [{ role: 'user', content: '안녕하세요' }],
})
// 응답 5.2초, thinking 4,200 토큰 사용

댓글 5

김김영삼5개월 전

4.9에서 extended thinking이 자동 활성되어 단순 질문에도 가끔 가동. 끄는 방법 정리.


1. thinking 비활성


const response = await anthropic.messages.create({
model: 'claude-sonnet-4-9',
max_tokens: 1024,
thinking: { type: 'disabled' }, // ← 강제 비활성
messages: [{ role: 'user', content: '안녕하세요' }],
})

강제로 OFF. 단순 응답 0.5초.


2. budget 제한 — auto일 때


thinking: {
type: 'enabled',
budget_tokens: 500, // 최대 500 토큰까지만 thinking
}

3. 시스템 prompt로 thinking 억제


system: 'Answer concisely without extended reasoning unless the user asks for detailed analysis.'

덜 strict하지만 자연어로 thinking 거의 안 함.


4. 라우터 패턴


질문 유형에 따라 분기. 단순 질문은 Haiku 4.9, 복잡 질문은 Sonnet thinking ON.


// classifier
const intent = await classifyIntent(question) // 빠른 LLM
if (intent === 'simple') {
return await anthropic.messages.create({ model: 'haiku-4-9', ... })
}
if (intent === 'reasoning') {
return await anthropic.messages.create({
model: 'sonnet-4-9',
thinking: { type: 'enabled' },
...
})
}

저희 운영



  • 채팅 대부분 — thinking disabled 또는 budget 200

  • 코딩 / 복잡 분석 요청 — thinking auto

  • routing classifier가 분류


평균 응답 시간 1.4초 안정. thinking 비용 -78% 절감.

풀풀스택지훈5개월 전

4.9의 자동 thinking은 좋은 방향이지만 chat 응용 프로그램에서는 latency 부담입니다. budget 200 정도가 안전한 기본값.

jjin(guest)5개월 전
streaming 켜셨나요? thinking 진행 중에도 token stream 받으면 사용자 체감 지연 줄어듭니다. UI에서 "생각 중..." 표시.
오오세영(guest)5개월 전
3년 차 개발자인데 이런 깊은 답변 매번 도움 많이 됩니다. 책에서 안 나오는 실전 내용이 많아서 좋아요.
취취미코딩(guest)5개월 전
같은 문제 한 달째 헤매고 있었는데 위 답변으로 단번에 해결됐습니다. 감사합니다.
Ctrl+Enter로 등록