fix(llm): use JSON mode for Groq structured output#32
Open
siavashh wants to merge 13 commits into
Open
Conversation
- 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>
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groq tool-call validation rejects responses that omit defaulted Pydantic fields (e.g. generator
_DocPackage.selected_projects). Useinstructor.Mode.JSONfor Groq, consistent with gemini/nvidia.