Skip to content

fix: restore Groq search compatibility#1050

Open
stablegenius49 wants to merge 1 commit intoItzCrazyKns:masterfrom
stablegenius49:pr-factory/issue-980-groq-tool-schema
Open

fix: restore Groq search compatibility#1050
stablegenius49 wants to merge 1 commit intoItzCrazyKns:masterfrom
stablegenius49:pr-factory/issue-980-groq-tool-schema

Conversation

@stablegenius49
Copy link

@stablegenius49 stablegenius49 commented Mar 11, 2026

Summary

  • switch Groq structured-output calls to json_object instead of the stricter json_schema helper path
  • keep Groq JSON parsing resilient by reusing the existing JSON repair/extraction step
  • remove the redundant type argument requirement from the web_search tool schema so Groq/OpenAI-compatible tool calls validate cleanly

Verification

  • npx tsc --noEmit
  • npx eslint src/lib/models/providers/groq/groqLLM.ts src/lib/agents/search/researcher/actions/webSearch.ts
  • npm run build

Closes #980


Summary by cubic

Restores Groq structured-output and search tool compatibility by switching to resilient JSON parsing and aligning the web search action schema. Closes #980.

  • Bug Fixes
    • In GroqLLM.generateObject, request json_object and parse with @toolsycc/json-repair before schema validation.
    • Remove the redundant type field from the web_search action schema to validate with Groq/OpenAI tool calls.

Written for commit bf53e59. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

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.

Groq models fail with json_schema and web_search tool schema errors after 1.12.1 update

1 participant