Skip to content

[Feature]: python doctor.py should ping the LLM with a real prompt #11

Description

@Aditya-00a

What problem does this solve?

agent/doctor.py already checks "is Ollama running" and "is the configured model pulled". But it doesn't actually send a test prompt — so a half-broken Ollama install (model corrupted, GPU OOM on first inference, etc.) won't get caught until the loop crashes mid-cycle.

What to do

Add an 11th check, check_llm_inference():

  1. After the model-pulled check passes, send a minimal prompt to the LLM
  2. Use a 5-second timeout
  3. Prompt: "Reply with the single word 'ok' and nothing else."
  4. Pass if the response contains "ok" (case-insensitive); fail otherwise with the response in detail

Proposed solution

Acceptance

  • python doctor.py shows an 11th line for "LLM inference works"
  • --json mode includes the new check
  • A broken model (e.g. corrupted weights) makes the check fail with a useful error message

Notes

  • Use the existing OpenAI client setup (backend/services/llm_client.py) so you get the same code path the loop uses
  • Don't add a new Ollama-specific HTTP call; go through the abstraction

Alternatives you considered

No response

Are you up for contributing this?

  • Yes, I'd like to send a PR
  • Yes, with some guidance
  • No, just suggesting

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions