Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 7
Rename "planetary copilot" to "planet computer" and clear example prompts#645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
1490bd823f65f1099be07b76695ef3abcd7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -34,14 +34,15 @@ export async function getModel(requireVision: boolean = false) { | ||
| if (selectedModel) { | ||
| switch (selectedModel) { | ||
| case 'QCX-Terra': | ||
| case 'Grok 4.2': | ||
| if (xaiApiKey) { | ||
| const xai = createXai({ | ||
| apiKey: xaiApiKey, | ||
| baseURL: 'https://api.x.ai/v1', | ||
| }); | ||
| try { | ||
| return xai('grok-4-fast-non-reasoning'); | ||
| return xai(requireVision ? "grok-vision-beta" : "grok-4-fast-non-reasoning"); | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash# Verify where getModel() is used with structured-output APIs.# Expected: identify call sites where getModel(...) feeds streamObject/generateObject flows.set -euo pipefail
echo"== getModel call sites =="
rg -n -C2 '\bgetModel\s*\(' --type ts --type tsx
echoecho"== structured output API usage (streamObject/generateObject) =="
rg -n -C3 '\b(streamObject|generateObject)\s*\(' --type ts --type tsx
echoecho"== resolution-search and related agents around model selection =="
rg -n -C4 'model:\s*await\s+getModel|model:\s*\(await getModel' lib --type ts --type tsxRepository: QueueLab/QCX Length of output: 128 🏁 Script executed: #!/bin/bashset -euo pipefail
echo"== getModel call sites =="
rg -n -C2 '\bgetModel\s*\(' lib -g'*.ts' -g'*.tsx'echoecho"== structured output call sites =="
rg -n -C3 '\b(streamObject|generateObject)\s*\(' lib -g'*.ts' -g'*.tsx'echoecho"== look for model: (await) getModel near structured output usage =="
rg -n -C4 'model:\s*\(?\s*(await\s+)?getModel' lib -g'*.ts' -g'*.tsx'Repository: QueueLab/QCX Length of output: 10620 🏁 Script executed: #!/bin/bashset -euo pipefail
echo"== lib/utils/index.ts around getModel =="
sed -n '1,140p' lib/utils/index.ts | nl -ba | sed -n '1,140p'echoecho"== lib/utils/index.ts: lines ~35-110 (for exact grok routing) =="
sed -n '35,110p' lib/utils/index.ts | nl -ba
echoecho"== lib/agents/task-manager.tsx: generateObject block =="
sed -n '1,120p' lib/agents/task-manager.tsx | nl -ba | sed -n '1,120p'echoecho"== lib/agents/query-suggestor.tsx: streamObject block end (schema) =="
sed -n '1,120p' lib/agents/query-suggestor.tsx | nl -ba | sed -n '40,120p'echoecho"== lib/agents/inquire.tsx: streamObject block end (schema) =="
sed -n '1,120p' lib/agents/inquire.tsx | nl -ba | sed -n '1,120p'Repository: QueueLab/QCX Length of output: 158 🏁 Script executed: #!/bin/bashset -euo pipefail
echo"== lib/utils/index.ts (first 140 lines) =="
sed -n '1,140p' lib/utils/index.ts | cat -n
echoecho"== lib/agents/task-manager.tsx (first 140 lines) =="
sed -n '1,140p' lib/agents/task-manager.tsx | cat -n
echoecho"== lib/agents/query-suggestor.tsx (first 120 lines) =="
sed -n '1,120p' lib/agents/query-suggestor.tsx | cat -n
echoecho"== lib/agents/inquire.tsx (first 120 lines) =="
sed -n '1,120p' lib/agents/inquire.tsx | cat -nRepository: QueueLab/QCX Length of output: 15644 🏁 Script executed: #!/bin/bashset -euo pipefail
echo"== lib/utils/index.ts: grok-4-fast-non-reasoning routing =="
rg -n "grok-4-fast-non-reasoning" lib/utils/index.ts
echoecho"== structured output call sites using getModel() ==" rg -n -C2 "model:\s*\(await\s+getModel\(\)\)" lib -g'*.ts' -g'*.tsx'| rg -n -C2 "(streamObject|generateObject)"echoecho"== structured output call sites (streamObject/generateObject) that pass schema =="
rg -n -C2 "(streamObject|generateObject)\s*\(" lib -g'*.ts' -g'*.tsx'| rg -n -C2 "schema:"Repository: QueueLab/QCX Length of output: 2028 Route structured-output calls to a JSON-schema-compatible model (xAI grok-4-fast-non-reasoning is unsafe)
Per the guidance, structured-output workers must not use 🤖 Prompt for AI Agents | ||
| } catch (error) { | ||
| console.error('Selected model "Grok 4.2" is configured but failed to initialize.', error); | ||
| throw new Error('Failed to initialize selected model.'); | ||
| @@ -57,7 +58,7 @@ export async function getModel(requireVision: boolean = false) { | ||
| apiKey: gemini3ProApiKey, | ||
| }); | ||
| try { | ||
| return google('gemini-3.1-pro-preview'); | ||
| return google(requireVision ? "gemini-1.5-pro" : "gemini-3.1-pro-preview"); | ||
| } catch (error) { | ||
| console.error('Selected model "Gemini 3.1 Pro" is configured but failed to initialize.', error); | ||
| throw new Error('Failed to initialize selected model.'); | ||
| @@ -86,7 +87,7 @@ export async function getModel(requireVision: boolean = false) { | ||
| baseURL: 'https://api.x.ai/v1', | ||
| }); | ||
| try { | ||
| return xai('grok-4-fast-non-reasoning'); | ||
| return xai(requireVision ? "grok-vision-beta" : "grok-4-fast-non-reasoning"); | ||
| } catch (error) { | ||
| console.warn('xAI API unavailable, falling back to next provider:'); | ||
| } | ||
| @@ -97,7 +98,7 @@ export async function getModel(requireVision: boolean = false) { | ||
| apiKey: gemini3ProApiKey, | ||
| }); | ||
| try { | ||
| return google('gemini-3.1-pro-preview'); | ||
| return google(requireVision ? "gemini-1.5-pro" : "gemini-3.1-pro-preview"); | ||
| } catch (error) { | ||
| console.warn('Gemini 3.1 Pro API unavailable, falling back to next provider:', error); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 2454
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 669
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 12654
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 14997
🏁 Script executed:
Repository: QueueLab/QCX
Length of output: 6945
Fix empty system prompt persistence mismatch
The form schema allows an empty
systemPrompt(.min(0)with default""), butlib/actions/chat.ts’ssaveSystemPromptrejects it viaif (!prompt) return { error: 'Prompt is required' }, so clearing/saving an empty prompt fails.Chat/AI runtime is likely safe because
app/actions.tsxconvertsnullto'', andlib/agents/researcher.tsxfalls back togetDefaultSystemPrompt(...)whendynamicSystemPrompt.trim()is empty.Update
saveSystemPromptto accept empty strings (or convert empty string tonullfor storage) so UI behavior matches backend behavior.🤖 Prompt for AI Agents