mirror of
https://github.com/dtzp555-max/ocp.git
synced 2026-07-21 21:15:09 +00:00
fix: computeFirstByteTimeout now respects CLAUDE_FIRST_BYTE_TIMEOUT env var
The adaptive timeout calculation ignored BASE_FIRST_BYTE_TIMEOUT (set via CLAUDE_FIRST_BYTE_TIMEOUT env), always using the tier base (120s for Sonnet). Now uses whichever is larger: adaptive or env override. Bump to v3.2.2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"id": "ocp",
|
"id": "ocp",
|
||||||
"name": "OCP Commands",
|
"name": "OCP Commands",
|
||||||
"description": "Slash commands for the OpenClaw Proxy — /ocp usage, /ocp settings, /ocp health, etc.",
|
"description": "Slash commands for the OpenClaw Proxy — /ocp usage, /ocp settings, /ocp health, etc.",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"configSchema": {
|
"configSchema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ocp",
|
"name": "ocp",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"description": "Slash commands for the OpenClaw Proxy",
|
"description": "Slash commands for the OpenClaw Proxy",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "openclaw-claude-proxy",
|
"name": "openclaw-claude-proxy",
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"description": "OCP (Open Claude Proxy) — use your Claude Pro/Max subscription as an OpenAI-compatible API for any IDE. Works with Cline, OpenCode, Aider, Continue.dev, OpenClaw, and more.",
|
"description": "OCP (Open Claude Proxy) — use your Claude Pro/Max subscription as an OpenAI-compatible API for any IDE. Works with Cline, OpenCode, Aider, Continue.dev, OpenClaw, and more.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
+3
-1
@@ -374,7 +374,9 @@ function getModelTier(cliModel) {
|
|||||||
|
|
||||||
function computeFirstByteTimeout(cliModel, promptLength) {
|
function computeFirstByteTimeout(cliModel, promptLength) {
|
||||||
const tier = MODEL_TIMEOUT_TIERS[getModelTier(cliModel)];
|
const tier = MODEL_TIMEOUT_TIERS[getModelTier(cliModel)];
|
||||||
const timeout = tier.base + Math.floor(promptLength * tier.perPromptChar);
|
const adaptive = tier.base + Math.floor(promptLength * tier.perPromptChar);
|
||||||
|
// Use whichever is larger: adaptive calculation or BASE_FIRST_BYTE_TIMEOUT (env override)
|
||||||
|
const timeout = Math.max(adaptive, BASE_FIRST_BYTE_TIMEOUT);
|
||||||
return Math.min(timeout, Math.max(TIMEOUT - 5000, 10000));
|
return Math.min(timeout, Math.max(TIMEOUT - 5000, 10000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user