fix(groq): honor model kwarg in generate_with_usage response metadata#207
Conversation
Fixes OpenAgentHQ#79 generate_with_usage() already sent the per-request model override in the API payload but LLMResponse.model always used self.model. Use the resolved request model so evaluation pipelines and cost trackers attribute responses correctly.
PR Review: fix(groq): honor model kwarg in generate_with_usage response metadataOverall: ✅ Looks good. One-line bug fix with appropriate test coverage. Change
TestsThe two new tests follow the existing patterns correctly:
Lint / TypesLint passes on the changed file (the two pre-existing E402 warnings in VerdictApprove. No issues found. |
|
🎉 Congratulations @syf2211! Your pull request has been successfully merged into main. 🚀 Thank you for contributing to OpenAgentHQ and helping improve the project. We truly appreciate your contribution and hope to see you back with more amazing PRs! Happy Open Sourcing! ❤️ 🌟 This is your first merged contribution to this repository. |

Description
Groq.generate_with_usage()already sent the per-requestmodeloverride in the API payload but always reportedself.modelin the returnedLLMResponse. This fix uses the resolved request model so response metadata matches the model actually used.Type of Change
Related Issues
Closes #79
How Has This Been Tested?
pytest tests/unit/test_providers/test_groq.py -v— 18 passed)ruff checkon groq.py and test_groq.py)uv run mypy openagent_eval/)Checklist
Additional Notes
One-line behavioral fix in
groq.py; follows the model-override testing pattern fromtest_ollama.py.