Fixed any issues with the PR
This commit is contained in:
@@ -38,7 +38,7 @@ LLM_PROVIDER=
|
|||||||
# Not needed for codex (uses ~/.codex/auth.json) or ollama (local)
|
# Not needed for codex (uses ~/.codex/auth.json) or ollama (local)
|
||||||
LLM_API_KEY=
|
LLM_API_KEY=
|
||||||
# Optional override. Each provider has a sensible default:
|
# 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=
|
LLM_MODEL=
|
||||||
# Ollama base URL (only needed if not using default http://localhost:11434)
|
# Ollama base URL (only needed if not using default http://localhost:11434)
|
||||||
OLLAMA_BASE_URL=
|
OLLAMA_BASE_URL=
|
||||||
|
|||||||
@@ -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 |
|
| `codex` | None (uses `~/.codex/auth.json`) | gpt-5.3-codex |
|
||||||
| `minimax` | `LLM_API_KEY` | MiniMax-M2.5 |
|
| `minimax` | `LLM_API_KEY` | MiniMax-M2.5 |
|
||||||
| `mistral` | `LLM_API_KEY` | mistral-large-latest |
|
| `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.
|
For Codex, run `npx @openai/codex login` to authenticate via your ChatGPT subscription.
|
||||||
|
|
||||||
@@ -308,6 +308,7 @@ crucix/
|
|||||||
│ │ ├── anthropic.mjs # Claude
|
│ │ ├── anthropic.mjs # Claude
|
||||||
│ │ ├── openai.mjs # GPT
|
│ │ ├── openai.mjs # GPT
|
||||||
│ │ ├── gemini.mjs # Gemini
|
│ │ ├── gemini.mjs # Gemini
|
||||||
|
├── ├── grok.mjs # Grok
|
||||||
│ │ ├── openrouter.mjs # OpenRouter (Unified API)
|
│ │ ├── openrouter.mjs # OpenRouter (Unified API)
|
||||||
│ │ ├── codex.mjs # Codex (ChatGPT subscription)
|
│ │ ├── codex.mjs # Codex (ChatGPT subscription)
|
||||||
│ │ ├── minimax.mjs # MiniMax (M2.5, 204K context)
|
│ │ ├── minimax.mjs # MiniMax (M2.5, 204K context)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export class GrokProvider extends LLMProvider {
|
|||||||
super(config);
|
super(config);
|
||||||
this.name = 'grok';
|
this.name = 'grok';
|
||||||
this.apiKey = config.apiKey;
|
this.apiKey = config.apiKey;
|
||||||
this.model = config.model || 'grok-3';
|
this.model = config.model || 'grok-4-latest';
|
||||||
}
|
}
|
||||||
|
|
||||||
get isConfigured() {
|
get isConfigured() {
|
||||||
@@ -22,6 +22,7 @@ export class GrokProvider extends LLMProvider {
|
|||||||
Authorization: `Bearer ${this.apiKey}`,
|
Authorization: `Bearer ${this.apiKey}`,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
max_tokens: opts.max_tokens || 4096,
|
||||||
messages: [
|
messages: [
|
||||||
{ role: 'system', content: systemPrompt },
|
{ role: 'system', content: systemPrompt },
|
||||||
{ role: 'user', content: userMessage },
|
{ role: 'user', content: userMessage },
|
||||||
@@ -39,7 +40,7 @@ export class GrokProvider extends LLMProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
const text = data.choices?.[0].message?.content || '';
|
const text = data.choices?.[0]?.message?.content || '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
|
|||||||
Reference in New Issue
Block a user