Skip to content

fix(llm): use JSON mode for Groq structured output#32

Open
siavashh wants to merge 13 commits into
vasu-devs:mainfrom
siavashh:fix/groq-instructor-json-mode
Open

fix(llm): use JSON mode for Groq structured output#32
siavashh wants to merge 13 commits into
vasu-devs:mainfrom
siavashh:fix/groq-instructor-json-mode

Conversation

@siavashh
Copy link
Copy Markdown

@siavashh siavashh commented May 8, 2026

Groq tool-call validation rejects responses that omit defaulted Pydantic fields (e.g. generator _DocPackage.selected_projects). Use instructor.Mode.JSON for Groq, consistent with gemini/nvidia.

Vasudev Siddh and others added 13 commits May 7, 2026 13:30
- Add in-app Help Chat (HelpChat.tsx + help_agent.py): context-aware AI
  assistant that answers setup, configuration, and workflow questions
- Harden all agent system prompts with production-quality guard rails
  (injection defense, anti-hallucination constraints, evidence-first scoring)
- Evaluator: overhaul scoring with calibrated evidence-backed rating logic
- Free Scout / Scout: major expansion — HN job post detection, improved
  quality gate and ranking heuristics
- Query Gen: smarter query generation with expanded source coverage
- LLM: expanded provider support and improved routing
- Dashboard UI: significant view overhaul
- Settings: DiscoverySettings and shared settings layout improvements
- Backend main.py: new /api/v1/help/chat endpoint and route reorganisation
- DB client: additional query and CRUD helpers
- Tests: 177 lines added to test_regressions.py covering new agent behaviour
- Bump version 0.1.7 → 0.1.8 across package.json, Cargo.toml, tauri.conf.json
Groq's tool-call validator rejects completions that omit optional-looking
fields even when the Pydantic model supplies default_factory (e.g.
generator _DocPackage.selected_projects). Llama models often omit those
fields, causing 400 tool_use_failed errors.

Use instructor.Mode.JSON for Groq, consistent with gemini and nvidia.

Co-authored-by: Cursor <cursoragent@cursor.com>
@siavashh siavashh requested a review from vasu-devs as a code owner May 8, 2026 06:05
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

Someone is attempting to deploy a commit to the Vasu-Devs' projects Team on Vercel.

A member of the Team first needs to authorize it.

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