Aari e2816eaa97
fix(models): scope the OpenAI-compat rules to BaseChatOpenAI, not a class-path allowlist (#4146)
* fix(models): scope the OpenAI-compat rules to BaseChatOpenAI, not a class-path allowlist

* address review: drop redundant stream_usage helper, close test matrix

- Remove _enable_stream_usage_by_default and its now-unused _OPENAI_COMPAT_USE_PATHS
  tuple. The class-field stream_usage fallback already sets stream_usage=True for
  every BaseChatOpenAI subclass (they all declare the field), so the helper's
  use-path allowlist gated nothing real — verified a no-op in prod, and the two
  stream_usage tests stay green on main with the helper present. Those tests used a
  BaseChatModel stub that does not declare the field; point them at a real ChatOpenAI
  capturing class so they exercise the fallback they now depend on.
- Give the non-OpenAI normalization-skip test an actual api_base value so it exercises
  the skip path (api_base passed through verbatim, never rewritten to base_url).
- Add an Unreleased CHANGELOG entry for the api_base behavior change on the five
  affected subclasses.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-07-14 09:32:53 +08:00
..