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-03-23 07:43:12 -07:00
2026-03-29 20:57:57 -07:00
2026-03-30 20:36:56 -07:00
2026-03-28 17:25:04 -07:00
2026-03-23 22:45:55 -07:00
2026-03-24 07:30:25 -07:00
2026-03-27 13:22:01 -07:00
2026-03-27 04:03:00 -07:00
2026-03-30 02:45:41 -07:00
2026-03-30 02:45:41 -07:00
2026-03-26 14:50:26 -07:00
2026-03-24 07:30:25 -07:00
2026-03-24 08:19:34 -07:00
2026-03-23 07:43:12 -07:00
2026-03-29 15:55:05 -07:00
2026-03-27 15:28:19 -07:00
2026-03-23 22:45:55 -07:00
2026-03-28 14:43:41 -07:00
2026-03-29 15:52:54 -07:00
2026-03-22 15:02:26 -07:00
2026-03-25 16:52:04 -07:00
2026-03-28 11:21:44 -07:00
2026-03-26 19:38:04 -07:00
2026-03-27 07:49:44 -07:00
2026-03-29 15:17:46 -07:00
2026-03-26 14:35:31 -07:00
2026-03-28 17:52:32 -07:00
2026-03-29 20:08:22 -07:00
2026-03-26 13:40:21 -07:00
2026-03-30 08:37:19 -07:00
2026-03-26 01:08:02 +05:30
2026-03-28 17:52:32 -07:00
2026-03-28 11:21:44 -07:00
2026-03-29 21:51:44 -07:00
2026-03-24 07:30:25 -07:00
2026-03-28 23:45:53 -07:00
2026-03-23 15:40:42 -07:00
2026-03-29 20:55:04 -07:00
2026-03-30 08:10:14 -07:00