Skip to content

Embedding model picked as chat model floods Sentry with ollama 400 "does not support chat" (TAURI-RUST-4P6) #3359

Description

@oxoxDev

Source

Sentry (self-hosted): https://sentry.tinyhumans.ai/organizations/tinyhumans/issues/5338/
Short ID: TAURI-RUST-4P6 · Events: 36,600 · Users affected: 2 · First seen: 2026-05-27 · Last seen: 2026-06-04 · Live on 0.57.13 (production)

Symptom

A user has an embedding model (bge-m3:latest — OpenHuman's default memory-tree embed model) selected as their Ollama chat model. Every chat turn is rejected by Ollama with HTTP 400:

ollama API error (400 Bad Request): {"error":{"message":"\"bge-m3:latest\" does not support chat","type":"invalid_request_error","param":null,"code":null}}

Because the turn retries each cycle, two users alone generated 36.6k Sentry events.

Root cause

  • Ollama chat routes through OpenAiCompatibleProvider (name = "ollama") in src/openhuman/inference/provider/compatible.rs.
  • The existing actionable guard (completion_only_404_guard, Cannot write code on filesystem #3193) only fires on 404; this rejection is a 400, so it bypasses it and the raw upstream JSON bubbles up.
  • The Sentry classifier is_provider_config_rejection_message (src/openhuman/inference/provider/config_rejection.rs) pins "does not support tools" (TAURI-RUST-35) but not "does not support chat" → the 400 is never demoted and re-reports every turn.

Bug shape

Provider config-rejection / capability mismatch (user-state, not a server bug). Same family as TAURI-RUST-35 (does not support tools), #2239, #2612, #2902. Sentry has no remediation — the user must pick a chat-capable model.

Fix

Two layers:

  1. Classifier — add "does not support chat" to is_provider_config_rejection_message so the event is demoted error→info (36.6k → 0).
  2. Actionable error — add a not_chat_capable_guard (400/422) that replaces the opaque JSON with model '<m>' does not support chat — assign a chat-capable model in Settings → AI, preserving the phrase so it stays demoted on re-report.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions