Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

模型診斷

Claude Relay Test

檢查 Claude 轉接器是否保留串流、工具呼叫、思考簽章與 API 協定。

  • 協定相容性
  • 分組發現
  • 可匯出報告
線上測試

在您的端點上執行探測

您的金鑰會在 sandbox 中加密,僅會被使用一次,之後立即刪除,且永不儲存或記錄。請使用可撤銷的金鑰。

POST https://…/v1/messages

額外標頭

最多 8 個。值會與金鑰一同加密,且永不儲存;Authorization 一律來自金鑰欄位。

32 次探測 · 通常幾美分 · 幾分鐘

了解您的結果

示意報告展示協定檢查如何分組與評分。

查看範例報告
涵蓋範圍

32 次探測,涵蓋 5 個區域

每次探測都是一個小型請求,並依據公開的 Anthropic Messages API 合約進行判定。這裡不衡量回答品質;若要看這點,請使用 Claude nerf check。

01

Response structure

12
  • Streaming event sequenceA streamed answer must follow the documented event order and carry the same fields as the official API.
  • Non-streaming message shapeA plain JSON answer must have the documented fields: id, type, role, model, content, stop_reason, usage.
  • Usage accountingToken counts must be present, consistent between streaming and non-streaming, and not inflated by hidden text.
  • Response headersThe official API returns a request-id header on every answer.
  • max_tokens is honouredA tiny max_tokens must cut the answer short with stop_reason max_tokens and a small output count.
  • Stop sequencesA stop sequence must end the answer, be reported as stop_sequence, and not appear in the text.
  • System promptThe system field must reach the model. A relay that drops it answers the user question instead.
  • Conversation historyEarlier turns must reach the model: it has to repeat a secret word from the first message.
  • Tool callingA forced tool call must return a tool_use block with an id, the tool name and structured input.
  • Tool result round tripA tool_use followed by a tool_result must be accepted and the result used in the answer.
  • Streaming tool callA streamed tool call must assemble into valid JSON input and end with stop_reason tool_use.
  • Token counting endpointPOST /v1/messages/count_tokens should exist and return input_tokens. Many relays leave it out; that is only a warning.
02

Thinking and signature

3
  • Thinking blocks and signatureWith thinking on, the stream must carry a thinking block and a signature. Relays often drop or fake them.
  • Thinking in a plain answerA non-streaming answer with thinking on must hold a thinking block with text and a signature.
  • Thinking round tripThe thinking block from one answer is sent back in the next request. A forged signature is refused by the real API.
03

Images and documents

6
  • Image understandingA generated two-colour image is sent; the model must name both colours. A relay that strips images cannot.
  • Two images in one messageBoth images must reach the model, in order.
  • Large imageA 1000 by 1000 image must be accepted and read, not refused or silently shrunk to nothing.
  • PDF understandingA generated one-page PDF holds a random code; the model must read it back.
  • Multi-page PDFA three-page PDF holds the code on its last page; the whole document must reach the model.
  • Plain-text documentA text document block must be accepted and read.
04

Model identity

1
  • Model identityAsks who trained the model. An answer naming another vendor is a strong sign of substitution.
05

Error handling

10
  • Wrong key is refusedA made-up key must be refused with 401 or 403, not answered and not a server error.
  • Invalid max_tokensA non-numeric max_tokens must be rejected with 400 or 422.
  • Invalid thinking settingAn unknown thinking type must be rejected with 400 or 422.
  • Thinking budget too smallA thinking budget below the minimum must be rejected with 400 or 422.
  • Empty messagesAn empty messages list must be rejected with 400 or 422.
  • Invalid roleA message role the API does not define must be rejected with 400 or 422.
  • Missing modelA request without a model must be rejected with 400 or 422, not given a default.
  • Broken JSON bodyA body that is not valid JSON must be rejected with 400 or 422.
  • Temperature out of rangeA temperature above 1 must be rejected with 400 or 422, not clamped silently.
  • Unknown model nameA model that does not exist must be refused (400 or 404), not silently served by another model.

Claude 降規檢查 →

Agent 技能

從您自己的 Agent 執行

相同的探測也會以 Skill 形式提供。請求會直接從您的機器送到您的端點。

請您的 Agent 來詢問
Use the claude-relay-test skill to check my Claude relay at https://relay.example.com using model claude-opus-5-5.
或自行執行
export CLAUDE_RELAY_API_KEY=...
node scripts/check.mjs --base-url https://relay.example.com --model claude-opus-5-5 --out ./out

常見問題

「一致」的結果代表什麼?

代表該端點在這些探測中表現得像文件所述的 Messages API。它無法證明模型實際運行在哪裡,也無法說明回答品質。

和 Claude nerf check 有什麼不同?

nerf check 是在問模型是否夠強。這個測試則是在問端點是否像真正的 API:協定、thinking signature、圖片、PDF、錯誤代碼。

為什麼這些探測會有費用?

它們是真實請求:幾個簡短回答加上一個簡短的 thinking 回答。通常只要幾美分。

我的金鑰會怎麼處理?

它會在 sandbox 執行期間被封存,只會使用一次,之後就會刪除。它不會被儲存或記錄,報告也只會顯示標頭名稱。

為什麼我的 relay 會被標示為 Bedrock 或 Vertex?

那些雲端會以不同方式在 message id 前加上前綴。這只是提示,不會被視為失敗。