Skip to content

Latest commit

 

History

History
147 lines (118 loc) · 6.64 KB

frontier-model-dispatch.md

File metadata and controls

147 lines (118 loc) · 6.64 KB
name frontier-model-dispatch
description MANDATORY for any creative, copywriting, prototyping, brainstorming, code generation, review, or content work. Dispatches to the BEST external frontier models: OpenAI GPT-5.4 (top-tier copywriter), Google Gemini 3.1 Pro Preview (best reasoning), xAI Grok 4 (boldest takes), DeepSeek v3.2 (strongest technical). These are the CURRENT top-of-line versions — do NOT downgrade to older models (no GPT-4, no base Gemini, no old DeepSeek). Trigger whenever: doing ANY copywriting or HTML/UI work, user says 'use GPT' or 'external models' or 'dispatch' or 'fanout' or 'frontier', doing brainstorming or competitive analysis, generating content, reviewing code/copy, prototyping features or UIs. ALSO trigger proactively — Scott's rule: 'I definitely don't see enough OpenAI 5.4 spending. Do not be using Sonnet. Go top tier frontier.' If you catch yourself about to write marketing copy, HTML pages, or UI prototypes using Opus/Sonnet instead of dispatching to GPT-5.4 — STOP and use this skill.

Frontier Model Dispatch via AWS

CRITICAL: Use the Right Model Versions

Scott pays for top-tier frontier access. Always use the LATEST flagship versions:

Alias CORRECT Model (use this) WRONG (never use)
gpt OpenAI GPT-5.4 (openai/gpt-5.4) GPT-4, GPT-4o, GPT-4-turbo
gemini Google Gemini 3.1 Pro Preview (google/gemini-3.1-pro-preview) Gemini Pro, Gemini 1.5
grok xAI Grok 4 (x-ai/grok-4) Grok 3, Grok 2
deepseek DeepSeek v3.2 (deepseek/deepseek-v3.2) DeepSeek v2, DeepSeek-coder
llama Meta Llama 4 Maverick (meta-llama/llama-4-maverick) Llama 3, Llama 2
qwen Qwen3 235B (qwen/qwen3-235b) Qwen 2, Qwen 72B
mistral Mistral Large (mistralai/mistral-large) Mistral Medium, Mistral 7B

If you find yourself typing an older model ID, you're doing it wrong.

What Each Model Is Best At

  • GPT-5.4: The best copywriter available. Use for ALL marketing copy, landing pages, HTML, long-form content, creative writing. Scott's explicit instruction: use this, not Sonnet.
  • Gemini 3.1 Pro Preview: Best for analysis, structured output, deep reasoning, technical reviews.
  • Grok 4: Boldest, most unconventional angles. Great for edgy copy, contrarian takes.
  • DeepSeek v3.2: Strongest on technical content, structured analysis, code review.
  • Llama 4 Maverick: Fast drafts, diverse perspectives, good for volume.
  • Qwen3 235B: Multilingual, alternative viewpoints.

How to Dispatch

Quick Single-Model Call

ssh aws-pro 'cd /home/ubuntu && node dispatch.mjs ask gpt "Your prompt here"'

Fan Out to Multiple Models

ssh aws-pro 'cd /home/ubuntu && node dispatch.mjs fanout gpt,gemini,grok,deepseek "Your prompt here"'

For Long Prompts (ALWAYS use this for anything with quotes or special chars)

# Write prompt locally
cat << 'EOF' > /tmp/my-prompt.txt
Your long prompt here with 'quotes' and "special chars" and $variables
EOF

# Upload to AWS
scp /tmp/my-prompt.txt aws-pro:/tmp/my-prompt.txt

# Run with file content
ssh aws-pro 'cd /home/ubuntu && node dispatch.mjs ask gpt "$(cat /tmp/my-prompt.txt)"'

For Parallel Bulk Work (Node.js Script on AWS)

For complex multi-model work, write a Node.js script locally, upload it, and run it:

cat << 'EOF' > /tmp/my-task.mjs
import { readFileSync, writeFileSync } from "fs";

const OPENROUTER_KEY = "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";
const MODELS = {
  gpt: "openai/gpt-5.4",
  gemini: "google/gemini-3.1-pro-preview",
  grok: "x-ai/grok-4",
  deepseek: "deepseek/deepseek-v3.2",
};

async function askModel(name, modelId, prompt, outFile) {
  const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + OPENROUTER_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      model: modelId,
      messages: [
        { role: "system", content: "Your system prompt" },
        { role: "user", content: prompt }
      ],
      max_tokens: 16000,
      temperature: 0.7,
    }),
  });
  const data = await resp.json();
  const content = data.choices?.[0]?.message?.content || "";
  writeFileSync(outFile, content);
  return content;
}

// Run all models in parallel
await Promise.allSettled([
  askModel("gpt", MODELS.gpt, "prompt", "/tmp/result-gpt.txt"),
  askModel("gemini", MODELS.gemini, "prompt", "/tmp/result-gemini.txt"),
  askModel("grok", MODELS.grok, "prompt", "/tmp/result-grok.txt"),
  askModel("deepseek", MODELS.deepseek, "prompt", "/tmp/result-deepseek.txt"),
]);
EOF

scp /tmp/my-task.mjs aws-pro:/tmp/my-task.mjs
ssh aws-pro 'cd /tmp && nohup node my-task.mjs > /tmp/task-log.txt 2>&1 &'

Then check results:

ssh aws-pro 'cat /tmp/task-log.txt; ls -la /tmp/result-*.txt'
scp aws-pro:/tmp/result-gpt.txt /tmp/result-gpt.txt

Token Limits

External models via OpenRouter typically cap output at ~4096-16000 tokens depending on model. For HTML pages or long content:

  • Set max_tokens: 16000 in the request
  • Keep prompts focused on ONE deliverable per call
  • For very long outputs, split into sections

When to Use (the answer is almost always)

  • Copywriting/Marketing: ALWAYS dispatch to GPT-5.4. Period.
  • HTML Pages / UI Prototypes: GPT-5.4 and Gemini 3.1 Pro both write excellent self-contained HTML.
  • Brainstorming: Fan out to 4+ models for diverse perspectives.
  • Reviews/Critique: Have external models review Claude's work for blind spots.
  • A/B Content: Generate competing versions from different models.
  • Code Review: DeepSeek v3.2 and Gemini 3.1 Pro catch different things than Claude.
  • Feature Prototyping: Have GPT-5.4 and Gemini mock up different approaches.

Self-Check: Am I About to Use the Wrong Model?

Before writing any creative/copy/HTML content yourself, ask:

  1. Would GPT-5.4 write this better? → Yes, dispatch it.
  2. Would multiple perspectives help? → Yes, fan out.
  3. Am I about to use an older model version? → Stop, check the table above.
  4. Is this a prototype/UI that external models could mock up? → Yes, dispatch it.

Common Gotchas

  1. Shell escaping: Single quotes in prompts break ssh commands. Use the file upload method.
  2. Connection resets: If SSH drops, the command may still be running. Check: ssh aws-pro 'ps aux | grep node'
  3. Results location: Always specify output file paths in /tmp/ on AWS.
  4. Background jobs: Use nohup ... & for long-running tasks.