Teknium
d30ea65c9b
fix: URL-based auth for third-party Anthropic endpoints + CI test fixes (#4148)
* fix(tests): mock sys.stdin.isatty for cmd_model TTY guard
* fix(tests): update camofox snapshot format + trajectory compressor mock path
- test_browser_camofox: mock response now uses snapshot format (accessibility tree)
- test_trajectory_compressor: mock _get_async_client instead of setting async_client directly
* fix: URL-based auth detection for third-party Anthropic endpoints + test fixes
Reverts the key-prefix approach from #4093 which broke JWT and managed
key OAuth detection. Instead, detects third-party endpoints by URL:
if base_url is set and isn't anthropic.com, it's a proxy (Azure AI
Foundry, AWS Bedrock, etc.) that uses x-api-key regardless of key format.
Auth decision chain is now:
1. _requires_bearer_auth(url) → MiniMax → Bearer
2. _is_third_party_anthropic_endpoint(url) → Azure/Bedrock → x-api-key
3. _is_oauth_token(key) → OAuth on direct Anthropic → Bearer
4. else → x-api-key
Also includes test fixes from PR #4051 by @erosika:
- Mock sys.stdin.isatty for cmd_model TTY guard
- Update camofox snapshot format mock
- Fix trajectory compressor async client mock path
---------
Co-authored-by: Erosika <eri@plasticlabs.ai>
2026-03-30 20:36:56 -07:00
..
2026-02-26 13:54:20 +03:00
2026-03-30 20:36:56 -07:00
2026-03-24 18:48:47 -07:00
2026-03-15 20:21:21 -07:00
2026-03-29 00:33:30 -07:00
2026-03-20 06:04:33 -07:00
2026-03-20 06:04:33 -07:00
2026-03-29 07:51:43 -07:00
2026-03-21 16:54:43 -07:00
2026-03-30 08:13:01 -07:00
2026-03-29 07:51:43 -07:00
2026-03-16 12:36:29 -07:00
2026-02-28 23:29:49 -08:00
2026-03-17 04:14:40 -07:00
2026-03-18 03:04:07 -07:00