Fixed any issues with the PR

This commit is contained in:
3byss
2026-03-27 22:22:21 -06:00
parent 9028d42a39
commit 457dba2800
3 changed files with 6 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ LLM_PROVIDER=
# Not needed for codex (uses ~/.codex/auth.json) or ollama (local)
LLM_API_KEY=
# Optional override. Each provider has a sensible default:
# anthropic: claude-sonnet-4-6 | openai: gpt-5.4 | gemini: gemini-3.1-pro | codex: gpt-5.3-codex | openrouter: openrouter/auto | minimax: MiniMax-M2.5 | ollama: llama3.1:8b | grok: grok-3
# anthropic: claude-sonnet-4-6 | openai: gpt-5.4 | gemini: gemini-3.1-pro | codex: gpt-5.3-codex | openrouter: openrouter/auto | minimax: MiniMax-M2.5 | ollama: llama3.1:8b | grok: grok-4-latest
LLM_MODEL=
# Ollama base URL (only needed if not using default http://localhost:11434)
OLLAMA_BASE_URL=

View File

@@ -233,7 +233,7 @@ Set `LLM_PROVIDER` to one of: `anthropic`, `openai`, `gemini`, `codex`, `openrou
| `codex` | None (uses `~/.codex/auth.json`) | gpt-5.3-codex |
| `minimax` | `LLM_API_KEY` | MiniMax-M2.5 |
| `mistral` | `LLM_API_KEY` | mistral-large-latest |
| `grok` | `LLM_API_KEY` | grok-3 |
| `grok` | `LLM_API_KEY` | grok-4-latest |
For Codex, run `npx @openai/codex login` to authenticate via your ChatGPT subscription.
@@ -308,6 +308,7 @@ crucix/
│ │ ├── anthropic.mjs # Claude
│ │ ├── openai.mjs # GPT
│ │ ├── gemini.mjs # Gemini
├── ├── grok.mjs # Grok
│ │ ├── openrouter.mjs # OpenRouter (Unified API)
│ │ ├── codex.mjs # Codex (ChatGPT subscription)
│ │ ├── minimax.mjs # MiniMax (M2.5, 204K context)

View File

@@ -7,7 +7,7 @@ export class GrokProvider extends LLMProvider {
super(config);
this.name = 'grok';
this.apiKey = config.apiKey;
this.model = config.model || 'grok-3';
this.model = config.model || 'grok-4-latest';
}
get isConfigured() {
@@ -22,6 +22,7 @@ export class GrokProvider extends LLMProvider {
Authorization: `Bearer ${this.apiKey}`,
},
body: JSON.stringify({
max_tokens: opts.max_tokens || 4096,
messages: [
{ role: 'system', content: systemPrompt },
{ role: 'user', content: userMessage },
@@ -39,7 +40,7 @@ export class GrokProvider extends LLMProvider {
}
const data = await res.json();
const text = data.choices?.[0].message?.content || '';
const text = data.choices?.[0]?.message?.content || '';
return {
text,