这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@homanp
Copy link
Contributor

@homanp homanp commented Jul 28, 2025

What does this PR do?

This pull request introduces enhancements to the Grok CLI tool, focusing on improving model selection flexibility, standardizing naming conventions, and ensuring code consistency. The key changes include adding multiple methods for specifying the AI model, replacing the selectedModel key with model, and applying consistent formatting and error handling across the codebase.

Enhancements to Model Selection:

  • Updated README.md to document three methods for specifying the AI model: command-line flag, environment variable (GROK_MODEL), and user settings file, with a defined priority order. [1] [2]
  • Modified CLI options to support the GROK_MODEL environment variable as an alternative to the --model flag. [1] [2] [3]

Standardization of Model Setting Key:

  • Replaced selectedModel with model in user settings and throughout the codebase for consistency. [1] [2] [3] [4] [5]
  • Updated default settings to use model with the value grok-4-latest.

Code Consistency and Maintenance:

  • Applied consistent double-quote formatting for strings and improved error handling in src/index.ts and src/utils/settings.ts. [1] [2] [3] [4] [5] [6]
  • Incremented the package version in package.json from 0.0.14 to 0.0.15.

These changes enhance usability, align naming conventions, and improve code readability and maintainability.

Fixes #47

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 28, 2025
@homanp homanp merged commit c4048a5 into main Jul 28, 2025
2 checks passed
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.

Feature Request: Support 'model' parameter in .env and .grok/settings.json

2 participants