_serves_messages_natively (src/gateway/api/routes/messages.py:95) compares AnyLLM.get_provider_class(provider)._amessages against AnyLLM._amessages. any-llm now exposes this publicly as SUPPORTS_MESSAGES_NATIVE on the provider class, and as ProviderMetadata.messages_native. Follow-up from #1366; the shim's own docstring commits to removing it once the upstream flag lands.
- Read
AnyLLM.get_provider_class(provider).SUPPORTS_MESSAGES_NATIVE. Drop both getattr guards and the shim paragraph at lines 108-114. Keep the empty-selector and unknown-provider fallbacks answering True. Prefer the class attribute over get_provider_metadata(), which builds a Pydantic model per request.
- Raise the
any-llm-sdk[all] floor in pyproject.toml:15 from >=1.27.1 to the release carrying the flag, or an older pin resolves and every Messages request with betas hits AttributeError.
No behavior change. The flag is True for the same five providers the _amessages comparison matches today: anthropic, azureanthropic, vertexaianthropic, meta, otari. The assertions in tests/unit/test_messages_client_betas.py hold as written.
Blocked on mozilla-ai/any-llm#1422 merging and shipping.
Note: this issue was drafted by Claude Opus 5 via back-and-forth with @njbrake. The reasoning and decisions are his; the prose is Claude's.
_serves_messages_natively(src/gateway/api/routes/messages.py:95) comparesAnyLLM.get_provider_class(provider)._amessagesagainstAnyLLM._amessages. any-llm now exposes this publicly asSUPPORTS_MESSAGES_NATIVEon the provider class, and asProviderMetadata.messages_native. Follow-up from #1366; the shim's own docstring commits to removing it once the upstream flag lands.AnyLLM.get_provider_class(provider).SUPPORTS_MESSAGES_NATIVE. Drop bothgetattrguards and the shim paragraph at lines 108-114. Keep the empty-selector and unknown-provider fallbacks answeringTrue. Prefer the class attribute overget_provider_metadata(), which builds a Pydantic model per request.any-llm-sdk[all]floor inpyproject.toml:15from>=1.27.1to the release carrying the flag, or an older pin resolves and every Messages request withbetashitsAttributeError.No behavior change. The flag is
Truefor the same five providers the_amessagescomparison matches today: anthropic, azureanthropic, vertexaianthropic, meta, otari. The assertions intests/unit/test_messages_client_betas.pyhold as written.Blocked on mozilla-ai/any-llm#1422 merging and shipping.
Note: this issue was drafted by Claude Opus 5 via back-and-forth with @njbrake. The reasoning and decisions are his; the prose is Claude's.