Repository navigation
ddg: x-vqd-hash-1 protocol rewrite (plugin v0.2.0) — FEAT-10 closed - #3
Merged
Merged
Conversation
DDG retired the x-vqd-4 token AND the 2025 model catalog. This is the full rewrite to the challenge-based protocol (reverse-engineered 2026-10-09, cross-validated against benoitpetit/duckduckgo-chat-cli): - Proof lifecycle: /status (x-vqd-accept: 1) returns a base64 JS challenge in x-vqd-hash-1; solved by the bundled Node helper (ddg_vqd.js, DDG_SOLVE_UA in lockstep with the request UA); post-processed like the page bundle (client_hashes -> base64(SHA256(String(value))), meta origin/stack/duration) -> the X-Vqd-Hash-1 REQUEST header; per-turn rotation via the /chat response header. - Chat body: canUseTools/canUseApproxLocation/reasoningEffort/ durableStream (client-minted RSA-2048 JWK via bundled ddg_durable.js). - SSE: role-based grammar (assistant/source/tool-invocation/ ui-component) + legacy action fallback + bracketed markers. - Catalog rotated: 8 live wire IDs (gpt-6-luna, gpt-5.6-luna, gpt-5.4-nano/mini, claude-haiku-4-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b) with forward-resolving legacy aliases; live discovery via fetch_capabilities() (/duckchat/v1/capabilities, proof-gated retry). - generate_stream() TRUE incremental (FEAT-10 closed) with full error-taxonomy parity. - Fixes over the first rewrite pass: is_cloud=True restored (BaseBackend defaults direct subclasses to local), tool/function roles fold to user (DDG only understands user/assistant), mixed-case legacy alias keys never matched the lowercased lookup, stream limit/403/429/5xx wrapping. - Tests: 49 -> 99 (proof lifecycle, wire shape, SSE grammar, stream, capabilities, taxonomy, alias table, node plumbing). Suite 3,433 passed / 20 skipped. ruff + black clean. - scripts/probe_duckduckgo.py rewritten for the new protocol (--live drives the backend end-to-end; TEST-13 automation). - audit: FEAT-10 CLOSED; TEST-13 partially closed (handshake live-verified via ddg-challenge-solver; one live 200 SSE turn remains). Register 136 findings / 18 OPEN.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DDG retired the x-vqd-4 token AND the 2025 model catalog. This is the full rewrite to the challenge-based protocol (reverse-engineered 2026-10-09, cross-validated against benoitpetit/duckduckgo-chat-cli):