mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
GET /models is not part of the Anthropic API spec and many compatible proxies do not implement it, causing the connection test to always fail even with a valid API key. Switch to POST /v1/messages with max_tokens=1 — the same approach used for the built-in anthropic provider — and treat any non-401/403 response as valid, since 400/529 still confirms the key was accepted. Use node.defaultModel / connection.defaultModel when set so the test respects the configured model rather than always falling back to claude-3-haiku-20240307. Co-authored-by: Rehan Choirul <rehanchrl@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>