Skip to content

Production LLM provider is never initialized (always returns llm_unavailable) #393

Description

@yush-1018

What happened?

I noticed that all our AI/LLM features (like the difficulty classifier fallback in issues-sweep.ts) are failing in production.

Looking at src/lib/llm/router.ts, the providerOverride variable starts as null and it's only ever updated in our unit tests. Because we don't have a default production provider (like Groq or Gemini) initialized in the router, pickProvider() always returns null when running live.

This means any call to llmCall will immediately fail with the "no LLM provider configured" error, completely disabling our AI features.

Steps to Reproduce

  1. Run the issues-sweep background job on a repo that has issues without difficulty labels.
  2. The sweep will trigger the llmFallback to classify the issue.
  3. Check the logs—the LLM call fails with llm_unavailable because no provider was loaded.

Expected Behavior

We should set up a default LLM provider in router.ts so the system has a production fallback when no test override is set.

Where does this occur?

Contributor Dashboard

Environment

No response

Screenshots / Logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
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