Skip to content

fix: initialize default production LLM provider client (#393)#405

Merged
jakharmonika364 merged 7 commits into
Coder-s-OG-s:mainfrom
yush-1018:fix/landing-page-refinement
Jun 24, 2026
Merged

fix: initialize default production LLM provider client (#393)#405
jakharmonika364 merged 7 commits into
Coder-s-OG-s:mainfrom
yush-1018:fix/landing-page-refinement

Conversation

@yush-1018

@yush-1018 yush-1018 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Currently, pickProvider() only returns a mock override set up in our tests, and there is no default client configured for production. Because of this, any background sweeps or classifications that trigger llmCall immediately fail with an llm_unavailable error, even when the API keys are configured.

Fixes #393

I've initialized the default production LLM client in the router to load using the configured environment variables, and updated pickProvider() to fall back to it when no test override is present. I also added cleanup in the test suite to prevent mock leaks.

All typechecks and unit tests are passing!

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@yush-1018 is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Ayush-Patel-56 Ayush-Patel-56 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things before merging: the beta-pill removal in LandingPage.tsx looks like leftover from branch reuse, not part of this fix, can you drop that hunk? Also package-lock.json has a bunch of unrelated peer: true noise across existing deps, probably an npm version mismatch - worth regenerating cleanly. The LLM fallback logic itself is correct.

@Ayush-Patel-56 Ayush-Patel-56 added the Needs author reply Author need to reply label Jun 23, 2026
@yush-1018 yush-1018 force-pushed the fix/landing-page-refinement branch from 51c1611 to 18766fe Compare June 23, 2026 18:51

@jakharmonika364 jakharmonika364 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minor suggestion about reading GROQ_API_KEY lazily (for deterministic testing) wasn't addressed, but that was a non-blocking nice-to-have, not a requirement.

@jakharmonika364 jakharmonika364 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scope is clean now, just the LLM fix. Approving.

@jakharmonika364 jakharmonika364 added level:critical Critical level difficulty quality:clean Clean, well-structured contribution type:bug Bug fix gssoc:approved Approved by GSSOC admin mentor:Ayush-Patel-56 Replace Ayush-Patel-56 with mentor's GitHub handle to credit them nsoc26 SSoC26 level3 Hard and removed Needs author reply Author need to reply labels Jun 24, 2026
@jakharmonika364 jakharmonika364 merged commit 4f2badd into Coder-s-OG-s:main Jun 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved by GSSOC admin Hard level:critical Critical level difficulty level3 mentor:Ayush-Patel-56 Replace Ayush-Patel-56 with mentor's GitHub handle to credit them nsoc26 quality:clean Clean, well-structured contribution SSoC26 type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Production LLM provider is never initialized (always returns llm_unavailable)

3 participants