Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Logistics Hiring Scores Using Unified Node Backend Proxy with One API Key and Retries

Описание и применение

Создание прокси‑сервера на Node, который скрывает ключи поставщиков и обеспечивает единый API‑ключ, строгую схему оценки кандидатов и контролируемые повторные попытки.

Задача

How to expose a single API key and unified endpoint for hiring candidate scoring while keeping provider credentials hidden and ensuring schema fidelity and controlled retries.

Результат

The proxy achieves a single‑key interface, strict schema enforcement, controlled retries, and keeps provider secrets internal, simplifying client integration and improving reliability.

Рабочий процесс

  • 1. Client authenticates with one API key to the proxy.
  • 2. Proxy resolves the requested model alias to a concrete provider model via configuration.
  • 3. Proxy forwards the request to the chosen provider SDK, keeping provider credentials internal.
  • 4. Provider returns structured output; proxy normalizes it into the unified rubric schema.
  • 5. Proxy validates the normalized object against the Zod schema (CandidateScore).
  • 6. If validation fails, proxy records a repair attempt and may retry on transient errors.
  • 7. Proxy returns the validated CandidateScore to the client, along with providerRequestId and attempts count.

Доказательства

A Node backend proxy should expose one API key and one unified endpoint while OpenAI, Anthropic Claude, and Google Gemini credentials remain behind the server boundary.

Источник

Use JSON Schema as the contract. Draft 2020-12 defines validation vocabulary for object shape, required properties, numeric bounds, and whether extra properties are permitted.

Источник

Retry only failures that may succeed without changing the request: rate limits, transient server failures, and transport interruption.

Источник

  • Дата записи: 2026-10-08T01:40:55.748Z