فحص تلقائي كل 30 دقيقة آخر تحديث تلقائي: 2026-11-30 03:30:02 UTC+8

دليل 2026: خطوات كشف تبديل النماذج في وسطاء AI API

يمكن لأي بوابة تزييف حقل model في JSON بسهولة؛ اتبع هذه الخطوات الأربع للتحقق الموضوعي قبل الشحن الإنتاجي.

anti-swapping.md

1. ستة أساليب شائعة لتبديل أو تخفيض النماذج

  • 1. Model Name Spoofing: Echoing claude-fable-5.2 or gpt-6.2-astra in JSON while routing to a cheaper model.
  • 2. Silent Tier Downgrades: Routing flagship calls (Opus / Astra / Fable) to budget tiers (Haiku / Terra / Flash).
  • 3. Dynamic Hybrid Routing: Serving genuine models on complex prompts while quietly downgrading peak or short traffic.
  • 4. Context & Thinking Stripping: Silently truncating 1M contexts or stripping extended thinking signatures and tool schemas.
  • 5. Canned Probe Responses: Returning cached template answers for famous benchmark or identity prompts.
  • 6. Hidden Prompt Injection & Token Inflation: Inflating reported prompt_tokens / completion_tokens relative to actual text.

2. خطوات التحقق الأربع القابلة للتكرار

Step 1: Issue a Low-Balance Revocable Test Key & Audit Schema

Never test with a production master key. Create a minimal-quota sub-key and verify JSON schema, returned model ID, and usage fields via our online verifier or curl.

Step 2: Inspect Official Upstream Headers & Protocol Signatures

Check OpenAI x-request-id headers and standard SSE [DONE] termination, or Anthropic request-id headers, message_start frames, and thinking signatures.

Step 3: Run Anti-Canned Dynamic Nonce & Capability Stress Tests

Test randomized math+nonce constraints, strict JSON Schema adherence, 10k–30k long-context needle retrieval, and multi-argument tool calling side-by-side against official APIs.

Step 4: Audit Token Metering & Multi-Window Consistency

Compare token counts against official baselines (flagging >20–30% inflation) and repeat checks across peak/off-peak hours before committing small incremental top-ups.