SIGN IN SIGN UP

feat(provider): session-cached plan resolution with default-flip to Provider API

Transport is chosen per model instance from the shared plan-resolution
seam (resolvePlan/normalizePlan in src/deals/plan-summary.ts): explicit
override (providerOptions plan, model option plan) -> COMMANDCODE_PLAN
env -> cached GET {base}/alpha/whoami (5s timeout, Bearer key, resolved
key/baseURL/injected fetch honoured) -> default Provider API. Only a
resolved "go" selects the legacy /alpha/generate transport; the Deals
intelligence default stays "go". The whoami fetch is cached for the
lifetime of the instance, including in-flight dedup for concurrent first
calls; offline/timeout/non-OK whoami falls through to Provider, never to
"go". Next session after an upgrade auto-switches (issue #54).

Legacy integration tests are pinned to plan go; provider-transport tests
cover the default flip, whoami-driven transport via mock and fetch spy,
and per-instance whoami caching.
R
Rashid Razak committed
a5aae15ecfeb487c7a80b1e1e9d68ed87c502119
Parent: e4792ab