Repository navigation
Fix issue #10729: Add xai/grok-code-fast-1 to MODELS_WITHOUT_STOP_WORDS - #147
Conversation
- Add grok-code-fast-1 to SUPPORTS_STOP_WORDS_FALSE_PATTERNS list - Add comprehensive tests for both grok-4-0709 and grok-code-fast-1 models - Test both provider-prefixed (xai/) and bare model names - Ensures compatibility with OpenRouter and other providers This change mirrors the fix applied to the main OpenHands repository in PR #10867 to maintain consistency across both codebases.
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
|
@OpenHands precommit checks are failing, please run it correctly per instructions in this repo and fix. |
|
I'm on it! enyst can track my progress at all-hands.dev 🟡 Solvability: MEDIUM MEDIUM: The issue points to failing pre-commit checks and references existing repo instructions, but it lacks the actual error output, steps taken, and environment context needed to diagnose and fix the problem. Providing the precise failure details should make this reasonably tractable. You can make the issue easier to resolve by addressing these concerns in the conversation:
Positive feedback:
|
Co-authored-by: openhands <openhands@all-hands.dev>
SummaryI successfully fixed the pre-commit check failures in PR #147. Here's what I accomplished: Issue Identified: The pre-commit checks were failing due to an E501 "Line too long" error in Solution Applied: Following the repository's instructions for handling long docstrings, I added Changes Made:
Verification:
✅ The new grok model tests continue to work correctly The PR should now pass all GitHub Actions pre-commit checks. The change was minimal and targeted - only adding the necessary noqa comment to resolve the line length violation without affecting any functionality. |
|
This is a small thing, I’m going to merge it to get it out of the way. 🫣 |
…DS (OpenHands#147) Co-authored-by: openhands <openhands@all-hands.dev>
End-user friendly description of the problem this fixes or functionality this introduces.
Fixed compatibility issue with the x-ai/grok-code-fast-1 model when used through OpenRouter. Users were experiencing "Client specified an invalid argument: stop" errors because this model doesn't support the stop parameter. The model is now properly configured to work without stop words.
Summarize what the PR does, explaining any non-trivial design decisions.
This PR adds the
grok-code-fast-1model to theSUPPORTS_STOP_WORDS_FALSE_PATTERNSlist inopenhands/sdk/llm/utils/model_features.py. This prevents the agent-sdk from sending thestopparameter to this model, which doesn't support it.The fix follows the same pattern as the previous fix for
grok-4-0709and mirrors the changes made to the main OpenHands repository in PR #10867. The model name pattern is added to the list of models that don't support stop words, and comprehensive tests are added to verify the behavior works correctly for both provider-prefixed (xai/grok-code-fast-1) and bare (grok-code-fast-1) model names.Changes Made:
grok-code-fast-1toSUPPORTS_STOP_WORDS_FALSE_PATTERNSinmodel_features.pytest_model_features.pyto include:grok-4-0709andgrok-code-fast-1modelsxai/) and bare model namesTesting:
supports_stop_words=FalseLink of any specific issues this addresses:
This change mirrors the fix applied to the main OpenHands repository in PR OpenHands/OpenHands#10867 for issue OpenHands/OpenHands#10729, ensuring consistency between the main OpenHands codebase and the agent-sdk.
Related:
@enyst can click here to continue refining the PR