Files
OmniRoute/changelog.d/features/10668-newapi-gateway-protocols.md
Yawar eb6f319712 feat(providers): add tabitoken gateway and serve hcnsec's four protocols (#10668)
Obrigado — PR muito bem documentado e verificado. Adiciona o gateway TabiToken (Anthropic-first, /v1/messages, x-api-key) e estende hcnsec de 1 para 4 protocolos (Chat, Responses, Anthropic Messages, Gemini). AlternateFormat ganha o hook urlBuilder opcional (necessário para o path model-scoped do Gemini), compartilhado com o provider gemini nativo em vez de duplicado.

Reconciliado nesta sessão contra o release tip atualizado (base drift real: 343→345 canônicos entre quando o PR foi criado e o merge, mais os PRs #10673/#10658 mergeados nesse meio-tempo). Conflitos em contagens de providers (docs, file-size baseline, teste de partição) resolvidos additivamente.

Validação (reconciliação a partir de origin/release/v3.8.50):
- typecheck:core limpo, complexity/cognitive-complexity dentro do baseline
- npm run check:provider-consistency — OK (266 REGISTRY entries, 346 providers canônicos, 0 exceções)
- 40/40 testes passando (newapi-gateway-providers, hcnsec-provider, providers-constants-split, alternate-formats)
2026-08-20 20:24:42 -03:00

1.3 KiB

  • feat(providers): add the TabiToken NewAPI gateway (tabitoken) and teach the existing HCNSec entry (hcnsec) the three further protocols it actually serves. TabiToken leaves the NewAPI pricing endpoint public, so its catalog is read from the host rather than guessed: four Claude models, each reporting the Anthropic and OpenAI protocols. HCNSec shipped OpenAI-only; probing the host showed /v1/messages, /v1/responses and the Gemini /v1beta path all reach its token layer, so each is now declared as an alternate format — with its default format, base URL, auth scheme and regional catalog classification untouched. (#10668) — thanks @yawar-aquil
  • feat(sse): allow an alternate protocol to build its own upstream URL. AlternateFormat gained an optional urlBuilder, because the Gemini protocol carries the model inside the path ({base}/{model}:generateContent) and the existing chatPath/urlSuffix fields are constants that cannot express it. The route builder is extracted as buildGeminiGenerateContentUrl and shared with the native gemini provider so the two consumers cannot drift on the ?alt=sse streaming suffix. (#10668) — thanks @yawar-aquil