Skip to content

fix(llm): providers implement abstract _chat_completion_impl — Ollama/all chat was dead (#11249) - #11250

Merged
mrveiss merged 1 commit into
Dev_new_guifrom
issue-ollama-provider
Jul 8, 2026
Merged

mrveiss merged 1 commit into
Dev_new_guifrom
issue-ollama-provider

Conversation

@mrveiss

@mrveiss mrveiss commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Thinking Path

User: "Company OS not loading" + "CEO chat just responds with a single phrase — Could you clarify? intent". Two bugs: (1) Company OS 500s from an unapplied DB migration (fixed separately on the box — see below), and (2) CEO chat → traced to provider_registry: No available provider for chat request. Ollama is up with models but the registry only had ['bedrock']. Root cause: OllamaProvider (and 4 others) override the concrete BaseProvider.chat_completion wrapper instead of implementing the abstract _chat_completion_impl, so __abstractmethods__ is non-empty → TypeError on instantiate → registration silently fails → no providers → all chat dead.

What Changed

Renamed the chat_completion override → _chat_completion_impl in the 5 genuinely-broken BaseProvider subclasses: OllamaProvider, CustomOpenAIProvider, GroqProvider, HuggingFaceProvider, VLLMBaseProvider. They now also correctly run inside the base rate-limiter/backoff wrapper. (ollama.py/vllm.py/transformers/mock are standalone classes, not affected.)

Verification

  • py_compile clean on all 5.
  • All 5 __abstractmethods__ == [] (instantiable).
  • Live on the deployed box (hotfixed): registry now ['ollama','bedrock']; svc.chat() returns real content via ollama/qwen3.5:9b (was empty). CEO chat restored.

Model Used

Opus 4.8 (1M context)

Closes #11249

…erriding the wrapper) — Ollama/chat was dead

BaseProvider.chat_completion is a concrete wrapper (rate-limiter + backoff)
around the abstract _chat_completion_impl. Five providers overrode the wrapper
instead of implementing the abstract, leaving __abstractmethods__ non-empty so
the class could not instantiate — registration threw (caught at debug) and the
provider silently vanished. With Ollama gone and Bedrock unconfigured, the
registry had no available provider and ALL chat failed (Company OS CEO chat
returned only the clarify fallback).

Rename the override to _chat_completion_impl in OllamaProvider, CustomOpenAI,
Groq, HuggingFace, VLLMBase; they now also run inside the base rate-limit/backoff
wrapper. Verified all five __abstractmethods__ empty; Ollama registers + chats live.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss

mrveiss commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Heads-up (parallel-session overlap): #11249 was resolved by #11257 (merged to Dev_new_gui as b58eb0c) — same fix (rename chat_completion → _chat_completion_impl in the 5 providers). The 5 providers are already concrete on base, so this PR is now redundant and #11249 is closed. Safe to close this PR (I left it untouched since it's your branch). Apologies for the race — we picked up the same issue concurrently.

@mrveiss
mrveiss merged commit 33059d0 into Dev_new_gui Jul 8, 2026
35 of 36 checks passed
@mrveiss
mrveiss deleted the issue-ollama-provider branch July 8, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant