Skip to content

Fix: Ollama 추론 모델에서 응답이 비어 아무것도 표시되지 않음 - #443

Merged
DO0OG merged 1 commit into
mainfrom
442-fix-ollama-reasoning-empty-response
Nov 12, 2026
Merged

DO0OG merged 1 commit into
mainfrom
442-fix-ollama-reasoning-empty-response

Conversation

@DO0OG

@DO0OG DO0OG commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Ollama에서 Gemma 4처럼 답하기 전에 추론을 하는 모델을 쓰면 추론이 응답 길이 한도를 다 써서 본문이 빈 채로 오고, Ari는 아무 표시 없이 끝났습니다.
  • VoiceCommand/agent/llm_provider.py: 내장 Ollama 제공자의 요청에 reasoning_effort: none을 보냅니다. 요청을 _create_chat_completion 한 곳으로 모았고, 이 값을 거절하는 옛 Ollama(400)에서는 값을 빼고 한 번 다시 요청합니다.
  • VoiceCommand/commands/ai_command.py: 최종 응답이 비었고 취소·도구 실행·스트림 출력이 없었으면 안내 문구를 한 번 보여 줍니다.
  • VoiceCommand/i18n/locales/{ko,en,ja}/LC_MESSAGES/ari.po, docs/USAGE.md, docs/README.md에 반영했습니다.

알아 둘 점

  • reasoning_effort: none은 Ollama 0.12.4 이상에서 동작합니다.
  • 추론을 다시 켜는 설정은 넣지 않았습니다.
  • 사용자 정의(OpenAI 호환) 제공자에 Ollama 주소를 넣은 경우에는 적용되지 않습니다.
  • 실제 Ollama 서버와 gemma4:12b로는 확인하지 못했습니다. 테스트는 가짜 클라이언트 기준입니다.

Test plan

  • QT_QPA_PLATFORM=offscreen python validate_repo.py 통과 (테스트 1646건, 건너뜀 1건)
  • tests.test_request_failures: test_ollama_requests_disable_reasoning, test_ollama_retries_without_reasoning_after_bad_request, test_create_chat_completion_retries_only_ollama_reasoning_rejection
  • tests.test_ai_command: test_empty_response_notice_is_suppressed_after_cancel_tool_or_stream
  • git diff --check 통과

Closes #442

Ollama에서 Gemma 4처럼 답하기 전에 추론을 하는 모델을 쓰면, 추론이 응답 길이
한도를 다 써서 본문이 빈 채로 오고 Ari는 아무 표시 없이 끝났습니다.

- Ollama 요청에 추론 끄기 값(reasoning_effort: none)을 보냄
- 이 값을 거절하는 옛 Ollama에서는 값을 빼고 한 번 다시 요청
- 응답이 비었을 때 안내 문구를 보여 줌(취소, 도구 실행, 이미 출력된 경우 제외)
- 사용 가이드와 문서 색인에 반영

Issues #442
@DO0OG DO0OG added the bug Something isn't working label Nov 12, 2026
@DO0OG DO0OG self-assigned this Nov 12, 2026
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ari-voice-command Ready Ready Preview Nov 12, 2026 2:55am UTC

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 11 complexity · 2 duplication

Metric Results
Complexity 11
Duplication 2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@DO0OG
DO0OG merged commit 0eb9293 into main Nov 12, 2026
5 checks passed
@DO0OG
DO0OG deleted the 442-fix-ollama-reasoning-empty-response branch November 12, 2026 03:03

This branch was successfully deployed

1 active deployment
Preview — a85947ca Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Gemma 4 via Ollama connects successfully but produces no visible or spoken response

1 participant