Haiku 較小的 200K API 上下文與 64K 最大輸出量,對於許多受限的任務而言仍相當可觀。 Sonnet 和 Opus 將這兩項限制分別擴展至 1M 和 128K。Haiku 4.5 採用手動擴展推理,而 Sonnet 5 和 Opus 5 則支援自適應推理與努力控制。這項差異正是為何單一且相同的推理設定,無法在所有模型上創建完全等效的測試之一。.
針對各項任務,您應該選用哪一款 Claude 型號?
工作量
從以下開始:
為何
升級時
分類、提取、轉送、支援分流
俳句 4.5
低延遲與低基礎代幣成本,適合執行清晰且可重複的工作。.
邊緣情況或校正時間會抵銷省下的成本。.
寫作、分析、視覺理解、日常編程
第5首十四行詩
在混合工作模式下,在速度、效能、情境與成本之間取得平衡。.
長遠的推理或驗證便成了瓶頸。.
複雜的編碼、困難的診斷、自主代理
作品第5號
能力比每代幣的最低價格更為重要。.
即使投入更多心力,Opus 仍未能通過一項嚴苛的代表性評估。.
極具特色、篇幅冗長或邏輯推演繁複的作品
Fable 5.1
這是 Opus 上方的當前升級路徑。.
僅在所測得的效益足以抵銷其較高成本時才應採用。.
這些只是起點,並非放諸四海皆準的解決方案。舉例來說,對於短小但影響重大的程式碼變更,使用 Opus 或許是合理的選擇;而對於耗時較長但結構高度明確的程式碼提取任務,Haiku 可能依然是合適的選擇。如需實際工作流程的範例,請參閱我們的指南: 使用 Claude 進行編碼.
當您的候選清單超出 Claude 範圍時,GlobalGPT 可讓您在同一個工作區中,將相同的代表性提示語分別套用至 Claude、GPT-5.6 Sol、Gemini 3 Pro 以及 Kimi K3。 請保持接受標準一致:對於重複性工作而言,速度至關重要;而答案品質與修正時間則決定了低成本的結果是否真的更划算。.
未產生任何模型輸出。兩次對 Anywhere API 的嘗試均返回 HTTP 503 狀態碼,因此此路徑被標記為不可用,並從品質評分中排除。.
Claude Sonnet 5:全輸出
```json
{
"root_cause": "Two bugs: (1) Promise.all rejects immediately if any task rejects, instead of ignoring rejected tasks; (2) results.find(Boolean) incorrectly treats falsy fulfilled values (0, false, '') as failures, causing them to be skipped in favor of null.",
"replacement": "async function firstSuccessful(tasks) {\n const settled = await Promise.allSettled(tasks.map((task) => task()));\n const firstFulfilled = settled.find((r) => r.status === 'fulfilled');\n return firstFulfilled ? firstFulfilled.value : null;\n}",
"tests": [
"test('returns null for empty array', async () => { expect(await firstSuccessful([])).toBeNull(); });",
"test('returns null when all tasks reject', async () => { const tasks = [() => Promise.reject('err1'), () => Promise.reject('err2')]; expect(await firstSuccessful(tasks)).toBeNull(); });",
"test('returns first fulfilled value even if falsy (0)', async () => { const tasks = [() => Promise.resolve(0), () => Promise.resolve(42)]; expect(await firstSuccessful(tasks)).toBe(0); });",
"test('returns first fulfilled value even if false', async () => { const tasks = [() => Promise.resolve(false), () => Promise.resolve(true)]; expect(await firstSuccessful(tasks)).toBe(false); });",
"test('returns first fulfilled value even if empty string', async () => { const tasks = [() => Promise.resolve(''), () => Promise.resolve('nonempty')]; expect(await firstSuccessful(tasks)).toBe(''); });",
"test('ignores leading rejected tasks and returns first fulfilled in order', async () => { const tasks = [() => Promise.reject('err'), () => Promise.resolve('second'), () => Promise.resolve('third')]; expect(await firstSuccessful(tasks)).toBe('second'); });",
"test('preserves input order even if later task resolves faster', async () => { const tasks = [() => new Promise((res) => setTimeout(() => res('slow-first'), 50)), () => new Promise((res) => setTimeout(() => res('fast-second'), 5))]; expect(await firstSuccessful(tasks)).toBe('slow-first'); });"
],
"remaining_risk": "The fix assumes 'first fulfilled value in input order' means the first task by array index that fulfills, regardless of timing, which matches the contract wording but await Promise.allSettled waits for all tasks to complete (including slow ones) before returning, which may not be desired if early-exit performance is needed; also unhandled promise rejection warnings are avoided by allSettled, but if tasks throw synchronously instead of returning rejected promises, this is not explicitly tested here beyond the reject cases."
}
```
Claude Opus 5:全輸出
{
"root_cause": "Two defects. (1) `Promise.all` rejects as soon as any task rejects, so a single rejected task makes the whole function reject instead of ignoring it and returning a later fulfilled value. (2) `results.find(Boolean) || null` selects by truthiness rather than by fulfillment, so legitimate fulfilled values such as 0, false, '', NaN, null, or undefined are skipped and/or coerced to null. Using `Promise.allSettled` plus a status check on the settled records fixes both, and returning `record.value` directly preserves falsy results.",
"replacement": "async function firstSuccessful(tasks) {\n const results = await Promise.allSettled(tasks.map((task) => task()));\n const firstFulfilled = results.find((result) => result.status === 'fulfilled');\n return firstFulfilled ? firstFulfilled.value : null;\n}",
"tests": [
"firstSuccessful([]) resolves to null (empty input).",
"firstSuccessful([() => Promise.resolve('a'), () => Promise.resolve('b')]) resolves to 'a' (input order, not completion order).",
"firstSuccessful([() => new Promise((res) => setTimeout(() => res('slow-first'), 50)), () => Promise.resolve('fast-second')]) resolves to 'slow-first' (order is by index, not by who settles first).",
"firstSuccessful([() => Promise.reject(new Error('boom')), () => Promise.resolve('second')]) resolves to 'second' (rejection ignored, does not propagate).",
"firstSuccessful([() => Promise.reject(new Error('a')), () => Promise.reject(new Error('b'))]) resolves to null (all reject).",
"firstSuccessful([() => Promise.resolve(0)]) resolves to 0, not null (falsy number preserved).",
"firstSuccessful([() => Promise.resolve(false)]) resolves to false (falsy boolean preserved).",
"firstSuccessful([() => Promise.resolve('')]) resolves to '' (empty string preserved).",
"firstSuccessful([() => Promise.resolve(undefined), () => Promise.resolve('later')]) resolves to undefined (first fulfilled wins even if its value is undefined).",
"firstSuccessful([() => Promise.reject(new Error('x')), () => Promise.resolve(null), () => Promise.resolve('third')]) resolves to null because index 1 fulfilled with null — verifying null-as-value is not confused with the all-rejected sentinel by inspecting status.",
"firstSuccessful([() => Promise.resolve(NaN)]) resolves to NaN (Number.isNaN on the result is true)."
],
"remaining_risk": "The function still starts every task and awaits all of them, so there is no short-circuiting: a slow or never-settling later task delays or blocks the result, and side effects of later tasks always occur. A task that throws synchronously (rather than returning a rejected promise) will throw inside `tasks.map`, causing the returned promise to reject instead of being ignored; wrap the invocation in `Promise.resolve().then(task)` if that must also be tolerated. `null` is still returned both for all-rejected/empty input and when a task genuinely fulfills with `null`, so callers cannot distinguish those cases. Non-array or non-function inputs are not validated, and rejection reasons are discarded rather than aggregated (no AggregateError), which can hide diagnostics."
}
Claude Fable 5.1:全輸出
{"root_cause":"Two defects: (1) Promise.all rejects as soon as any task rejects, so rejected tasks are not ignored and the function throws instead of skipping them; (2) results.find(Boolean) skips legitimate falsy fulfilled values (0, false, '') and the trailing '|| null' also converts such values to null, violating the requirement to return the first fulfilled value even when it is falsy.","replacement":"async function firstSuccessful(tasks) {\n const results = await Promise.allSettled(tasks.map((task) => task()));\n const first = results.find((result) => result.status === 'fulfilled');\n return first ? first.value : null;\n}","tests":["firstSuccessful([]) resolves to null","firstSuccessful([() => Promise.resolve('a'), () => Promise.resolve('b')]) resolves to 'a'","firstSuccessful([() => Promise.reject(new Error('x')), () => Promise.resolve('b')]) resolves to 'b' and does not throw","firstSuccessful([() => Promise.reject(new Error('x')), () => Promise.reject(new Error('y'))]) resolves to null","firstSuccessful([() => Promise.resolve(0), () => Promise.resolve(5)]) resolves to 0","firstSuccessful([() => Promise.resolve(false), () => Promise.resolve(true)]) resolves to false","firstSuccessful([() => Promise.resolve(''), () => Promise.resolve('z')]) resolves to ''","firstSuccessful([() => Promise.reject(new Error('x')), () => Promise.resolve(null)]) resolves to null (fulfilled null is returned as-is)","firstSuccessful([() => new Promise(r => setTimeout(() => r('slow'), 50)), () => Promise.resolve('fast')]) resolves to 'slow' (input order wins over settlement order)"],"remaining_risk":"All tasks are started concurrently and the function waits for every task to settle before returning, so a slow task delays the result even when an earlier task has already fulfilled; a sequential or early-exit strategy would be needed if latency matters. A task that throws synchronously (rather than returning a rejected promise) will still cause the function to reject, since the contract assumes tasks return promises. Promise.allSettled requires ES2020 or a polyfill."}
「首次有效輸出」政策。延遲時間指經由 Anywhere 的實際時間,而非原生 Anthropic 延遲。代幣計數由服務供應商回報;無法由此路由推斷出直接的 API 成本。.
這些 Anywhere 的結果顯示,為何模型選擇應依據任務本身,而非僅參考單一排行榜。在 GlobalGPT 中,您可以將相同的比較方法應用於您自己的提示詞,並將其與 Claude 及其他領先模型進行對比,進而選擇最符合您的品質標準、速度需求及審核工作量的輸出結果。.