You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Token Spy's authenticated catch-all is the compatibility path for provider endpoints it does not specialize. It forwarded method, path, body, and headers but silently removed every query parameter. Calls such as model listing or provider-specific operations could therefore target different upstream semantics than the client requested.
Root cause and invariant
proxy_other constructed url=f/{path} and never read the ASGI query string. The invariant is that an authenticated passthrough request preserves the raw encoded query component, including repeated keys, without changing the existing provider selection or header isolation.
The handler now appends scope[query_string] only when present, decoding the ASGI-defined ASCII bytes without parsing or normalizing them.
Overlap check
Searched open and closed PRs for token spy proxy query string, catch-all query passthrough, and ods/extensions/services/token-spy/main.py. Existing open changes cover decoded response headers (#2971), streaming status (#2970), usage bounds (#2969), atomic session files (#2803/#2798/#2795), Windows escaping (#2796), and exception narrowing (#2692/#2691). None changes catch-all URL construction.
Regression coverage
A new FastAPI boundary test sends an authenticated request with an encoded value and a repeated key, records the exact URL handed to the selected upstream client, and verifies the response still passes through.
Token Spy does not interpret query values; upstream remains responsible for them. Authentication headers stay isolated by the existing header builders. Reverting this commit restores the former query-dropping behavior without a data migration.
Validated merge order: #2989 ? #2990 ? #2993 ? #2991 ? #2992 ? #2994 ? #2995 ? #2996 ? #2997 ? #2998. The changes are independently useful; this order only reconciles shared model-router and magic-link files.
Synthetic integration head: origin/batch/quality-ten-20260822-round2-integration at 91eb730d. The only textual conflict was the two model-router tests inserting at the same class boundary; the integration resolution retains both contracts. Magic-link changes merged cleanly.
All required GitHub checks are green across the batch. #2992 initially hit a transient openSUSE repository/mirror failure while installing rsync; a clearly labeled empty retry commit reran the unchanged tree, and openSUSE plus the full matrix passed.
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
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.
Why this matters
Token Spy's authenticated catch-all is the compatibility path for provider endpoints it does not specialize. It forwarded method, path, body, and headers but silently removed every query parameter. Calls such as model listing or provider-specific operations could therefore target different upstream semantics than the client requested.
Root cause and invariant
proxy_otherconstructedurl=f/{path}and never read the ASGI query string. The invariant is that an authenticated passthrough request preserves the raw encoded query component, including repeated keys, without changing the existing provider selection or header isolation.The handler now appends
scope[query_string]only when present, decoding the ASGI-defined ASCII bytes without parsing or normalizing them.Overlap check
Searched open and closed PRs for
token spy proxy query string,catch-all query passthrough, andods/extensions/services/token-spy/main.py. Existing open changes cover decoded response headers (#2971), streaming status (#2970), usage bounds (#2969), atomic session files (#2803/#2798/#2795), Windows escaping (#2796), and exception narrowing (#2692/#2691). None changes catch-all URL construction.Regression coverage
A new FastAPI boundary test sends an authenticated request with an encoded value and a repeated key, records the exact URL handed to the selected upstream client, and verifies the response still passes through.
Validation
pytest -q ods/extensions/services/token-spy/tests/test_proxy_passthrough.py— 1 passedpython -m py_compile ods/extensions/services/token-spy/main.py ods/extensions/services/token-spy/tests/test_proxy_passthrough.pygit diff --checkTradeoffs and rollback
Token Spy does not interpret query values; upstream remains responsible for them. Authentication headers stay isolated by the existing header builders. Reverting this commit restores the former query-dropping behavior without a data migration.