mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 05:12:11 +03:00
qwen-web (cookie provider) had no PROVIDER_MODELS_CONFIG entry, so its model- discovery page returned an empty/stale local catalog — the OAuth fallback at the top of the route only fires for provider===qwen, so qwen-web fell through to the no-config branch. Added a qwen-web entry that fetches the public https://chat.qwen.ai/api/v2/models endpoint (no auth header configured/sent) and parses the { data: { data: [{ id, name, owned_by }] } } shape, with a flatter { data: [] } fallback. This is Problem #3 of #3931 (diagnosed by @thezukiru). Problem #1 (validator bare-token false-positive) shipped earlier in the merged PR #3958; Problem #2 (empty stream from Qwen WAF bot-detection on the streaming endpoint) is a separate upstream/stealth concern and stays open. TDD: tests/unit/qwen-web-models-discovery-3931.test.ts mocks the upstream and asserts source==='api' + the live ids (and the flatter shape), RED 0/2 -> GREEN 2/2. Rebaselined route.ts 2512->2531. Co-authored-by: thezukiru <thezukiru@users.noreply.github.com>