mirror of
https://github.com/can1357/oh-my-pi.git
synced 2026-11-23 12:53:26 +08:00
Classify every SimpleStreamOptions key once as client, gateway or server, checked by the compiler, and apply it at one choke point on the upstream-bound options only (applyCallerTrust). A scoped client loses every gateway option: request headers plus userProfileId, initiatorOverride, metadata, serviceTier and the other attribution, billing and transport keys, which /v1/pi/stream still accepted. The parsed request is left intact, so the Anthropic encoder still honors a scoped caller's anthropic-beta for thinking-binding-controls. pi-native filters on WIRE_OPTION_KEYS (client and gateway tiers), which adds taskBudget, include and anthropicPrefixMismatchBehavior, already accepted by the translated routes.