-
Notifications
You must be signed in to change notification settings - Fork 718
feat(providers): add request pacing controls #1584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
147a5e2
3000c9e
960f0cc
a60e56e
1bc37f9
79a63b8
8ee17ab
c3aa40b
de3ab94
36f4fba
7596cdc
a38bcac
3324063
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,7 @@ cross-route credential fallback не существует. Строки API GPT- | |
| | --- | --- | --- | | ||
| | `adapter` | `string` | Один из `openai-chat`, `openai-responses`, `anthropic`, `google`, `kiro`, `cursor`, `azure-openai` (или alias `azure`). | | ||
| | `baseUrl` | `string` | Базовый URL API upstream'а. Большинство built-in fixed-endpoint'ов игнорируют несовпадение; collision-safe key-preset'ы сохраняют старый custom destination с тем же именем. | | ||
| | `requestPacing?` | `{ enabled, requestsPerMinute?, minIntervalMs?, models? }` | Опциональная равномерная задержка начала исходящих запросов. Лимит провайдера действует на все модели, а правила моделей могут только увеличить задержку. Ожидание очереди не расходует таймаут заголовков ответа. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Both localized
As per path instructions for 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: Path instructions |
||
| | `responsesPath?` | `string` | Relative resource path для key-auth запросов `openai-responses`. Должен начинаться с `/` и не может содержать scheme, query или fragment. | | ||
| | `supportsServiceTier?` | `boolean` | Три состояния поддержки `service_tier`. `true`: fast mode может подставлять поле, значения вызывающего сохраняются. `false`: поле удаляется и никогда не подставляется (апстрим, для которого задокументировано отсутствие поддержки, не должен его получать). Не задано: провайдер не классифицирован — значения вызывающего сохраняются без изменений, fast mode не подставляет. Registry классифицирует canonical OpenAI (`true`), DeepSeek и Volcengine Ark (`false`); задавайте явно только для custom gateway'ев, реально поддерживающих tier'ы. | | ||
| | `preserveResponsesReasoningContent?` | `boolean` | Сохранять plaintext reasoning content в replay'нутых Responses reasoning item'ах вместо очистки (очистка — правило ChatGPT backend'а). Включайте для upstream'ов, чей контракт принимает reasoning replay, например DeepSeek. Proxy-minted `ocxr1` envelope'ы удаляются всегда. | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Clarify that pacing is separate from upstream rate limits.
Line 69 describes client-side request-start pacing, but it does not state that pacing is separate from upstream usage, billing, and rate-limit indicators. Add that distinction.
Also state that
modelsuses exact upstream model IDs. Include a slash-delimited example such asnvidia/llama-3.1-nemotron-ultra-253b-v1.Proposed documentation update
As per path instructions, provider documentation must clarify request-start frequency, provider-wide versus exact-model scope, and the distinction from upstream usage and billing rate-limit indicators.
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Path instructions