fix(openrouter): use endpoint context limits

This commit is contained in:
clawsweeper
2026-05-24 13:18:11 +00:00
parent 3acc62c7b5
commit 76fcc362d2
4 changed files with 50 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ Docs: https://docs.openclaw.ai
### Changes
### Fixes
- Tests: fail the kitchen-sink RPC Docker walk when gateway RSS sampling is unavailable instead of silently disabling the per-process memory guard.
- Tests: suppress the current Rolldown plugin timing warning format in the Vitest wrapper so tiny focused runs do not drown useful stderr in repeated build-timing noise.
- Models/OpenRouter: use endpoint-specific OpenRouter context limits from `top_provider` metadata so provider-routed models no longer overstate available context. (#85949) Thanks @TurboTheTurtle.

16
scripts/npm-runner.d.mts Normal file
View File

@@ -0,0 +1,16 @@
export type NpmRunnerParams = {
comSpec?: string;
env?: NodeJS.ProcessEnv;
execPath?: string;
existsSync?: (path: string) => boolean;
npmArgs?: string[];
platform?: NodeJS.Platform;
};
export function resolveNpmRunner(params?: NpmRunnerParams): {
args: string[];
command: string;
env?: NodeJS.ProcessEnv;
shell: boolean;
windowsVerbatimArguments?: boolean;
};

30
scripts/pnpm-runner.d.mts Normal file
View File

@@ -0,0 +1,30 @@
import type { ChildProcess, SpawnOptions } from "node:child_process";
export type PnpmRunnerParams = {
comSpec?: string;
cwd?: string;
detached?: boolean;
env?: NodeJS.ProcessEnv;
nodeArgs?: string[];
nodeExecPath?: string;
npmExecPath?: string;
platform?: NodeJS.Platform;
pnpmArgs?: string[];
stdio?: SpawnOptions["stdio"];
};
export function resolvePnpmRunner(params?: PnpmRunnerParams): {
args: string[];
command: string;
env?: NodeJS.ProcessEnv;
shell: boolean;
windowsVerbatimArguments?: boolean;
};
export function createPnpmRunnerSpawnSpec(params?: PnpmRunnerParams): {
args: string[];
command: string;
options: SpawnOptions;
};
export function spawnPnpmRunner(params?: PnpmRunnerParams): ChildProcess;

View File

@@ -0,0 +1,3 @@
export function resolvePathEnvKey(env: NodeJS.ProcessEnv): string;
export function buildCmdExeCommandLine(command: string, args: string[]): string;