Skip to content

Conversation

@shivasurya
Copy link
Owner

@shivasurya shivasurya commented Sep 29, 2025

This pull request adds support for xAI's Grok-4-fast-reasoning model to the SecureFlow CLI, including configuration, client implementation, and usage tracking. The changes ensure Grok can be selected, invoked, and its token usage properly tracked, alongside updates to recommendations and documentation.

Grok model integration:

  • Added Grok-4-fast-reasoning model configuration to model-context-limits.json, specifying its context window, output limits, and metadata notes. [1] [2]
  • Updated recommendations and reasoning lists to include Grok-4-fast-reasoning as a preferred large-context and reasoning model.

Codebase support for Grok:

  • Added GrokClient implementation in grok-client.js, supporting both standard and streaming requests to the xAI API.
  • Registered GrokClient in the AI client factory (ai-client-factory.js) for selection when Grok is requested. [1] [2]
  • Updated the AIModel type definition to include Grok-4-fast-reasoning.

Usage and token tracking:

  • Enhanced TokenTracker to handle Grok's usage format, including reasoning token tracking and fallback logic for Grok fields.

@shivasurya shivasurya self-assigned this Sep 29, 2025
@shivasurya shivasurya merged commit 6ab5a05 into main Sep 29, 2025
@shivasurya shivasurya deleted the shiva/grok-integ branch September 29, 2025 03:00
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.

2 participants