Conversation
Add support for Gatewayz AI gateway as a provider in the Zen API system. Gatewayz uses OpenAI-compatible API format and integrates seamlessly with the existing provider infrastructure. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
| toOaCompatibleRequest, | ||
| toOaCompatibleResponse, | ||
| } from "./openai-compatible" | ||
| import { gatewayzHelper } from "./gatewayz" |
There was a problem hiding this comment.
Bug: Gatewayz helper imported but never used
The gatewayzHelper is imported but never used or exported, meaning Gatewayz providers will incorrectly fall back to oaCompatHelper in the handler. This causes Gatewayz API calls to use the wrong endpoint path (/chat/completions instead of /v1/chat/completions), resulting in failed requests since Gatewayz requires the /v1 prefix according to the PR description.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| toOaCompatibleRequest, | ||
| toOaCompatibleResponse, | ||
| } from "./openai-compatible" | ||
| import { gatewayzHelper } from "./gatewayz" | ||
|
|
There was a problem hiding this comment.
Wire
gatewayzHelper into provider selection
The new helper is imported but never used, so selectProvider still returns oaCompatHelper for every provider whose format is "oa-compat". When a Gatewayz provider is configured (base URL https://api.gatewayz.ai), requests will still call modifyUrl from oaCompatHelper and hit /chat/completions instead of the /v1/chat/completions endpoint defined in gatewayz.ts, and any future Gatewayz‑specific header logic will also be skipped. As a result the new provider will 404 or fail auth. This helper needs to be explicitly selected when the provider ID is Gatewayz.
Useful? React with 👍 / 👎.
Summary
This PR adds support for Gatewayz as an LLM provider in the Zen API system. Gatewayz is a universal AI gateway that provides access to 50+ models across 13+ providers with circuit breakers, load balancing, and comprehensive monitoring.
Key Features
Changes Made
gatewayz.tsprovider helper with OpenAI-compatible format supportoa-compatformat in the Zen handlerAPI Compatibility
https://api.gatewayz.ai/v1/chat/completions- Main inference endpoint/v1/models- List available models/health/*- System and provider health monitoringTesting
Providers can be configured in the ZenData system by specifying:
id: Provider identifier (e.g., "gatewayz")api: Base URL (https://api.gatewayz.ai)format:"oa-compat"apiKey: Bearer token from Gatewayz account