Skip to content

feat: add Grok Build CLI provider - #26940

Closed
canderson26 wants to merge 1 commit into
NousResearch:mainfrom
canderson26:feat/grok-build-cli-provider-final
Closed

feat: add Grok Build CLI provider#26940
canderson26 wants to merge 1 commit into
NousResearch:mainfrom
canderson26:feat/grok-build-cli-provider-final

Conversation

@canderson26

Copy link
Copy Markdown

Summary

Adds a first-class grok-build provider backed by the local Grok Build CLI.

  • Registers grok-build in the provider registry, model catalog, aliases, model picker, runtime resolver, and auxiliary client path
  • Adds GrokCliClient, an OpenAI-compatible shim around grok --prompt-file for headless turns
  • Defaults to --no-memory --disable-web-search --max-turns 1 --output-format plain --effort xhigh
  • Supports HERMES_GROK_BUILD_COMMAND, GROK_CLI_PATH, HERMES_GROK_BUILD_ARGS, and HERMES_GROK_BUILD_EFFORT
  • Sets Grok Build context metadata to 512k for the CLI transport and documents setup

Testing

  • venv/bin/python -m py_compile agent/grok_cli_client.py agent/model_metadata.py hermes_cli/auth.py hermes_cli/models.py hermes_cli/runtime_provider.py hermes_cli/providers.py hermes_cli/model_normalize.py hermes_cli/model_switch.py hermes_cli/main.py hermes_cli/setup.py agent/auxiliary_client.py run_agent.py tests/agent/test_grok_cli_client.py tests/agent/test_model_metadata_local_ctx.py tests/hermes_cli/test_api_key_providers.py tests/hermes_cli/test_model_validation.py tests/run_agent/test_run_agent.py
  • venv/bin/python -m pytest tests/agent/test_grok_cli_client.py tests/agent/test_model_metadata_local_ctx.py tests/hermes_cli/test_api_key_providers.py tests/hermes_cli/test_model_validation.py tests/run_agent/test_run_agent.py::test_aiagent_uses_grok_cli_client -q

Notes

This provider relies on an already-authenticated local Grok Build CLI session. Run grok login and confirm grok models includes grok-build.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard provider/xai xAI (Grok) labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Resubmission of #26698 (closed). See also competing xAI provider PRs: #25968, #26437.

@canderson26

Copy link
Copy Markdown
Author

Happy to coordinate with #25968.

I think the scopes are complementary rather than competing:

If preferred, I can rebase after #25968 lands and reuse any shared xAI provider registry/auth helpers, but I’d keep xai-oauth and grok-build as distinct providers because the transport and available model surface are different.

@canderson26

Copy link
Copy Markdown
Author

Closing this for now. The fork live branch is back at upstream parity, and we will let the broader xAI provider work settle in the community rather than carrying a separate Grok Build CLI provider PR.

@canderson26
canderson26 deleted the feat/grok-build-cli-provider-final branch May 17, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/xai xAI (Grok) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants