mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:18:28 +00:00
chore: Fix types in tests 38/N.
This commit is contained in:
@@ -22,7 +22,7 @@ import { getApiKeyForModel } from "../agents/model-auth.js";
|
||||
import { ensureOpenClawModelsJson } from "../agents/models-config.js";
|
||||
import { discoverAuthStorage, discoverModels } from "../agents/pi-model-discovery.js";
|
||||
import { loadConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig, ModelProviderConfig } from "../config/types.js";
|
||||
import type { ModelsConfig, OpenClawConfig, ModelProviderConfig } from "../config/types.js";
|
||||
import { isTruthyEnvValue } from "../infra/env.js";
|
||||
import { DEFAULT_AGENT_ID } from "../routing/session-key.js";
|
||||
import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js";
|
||||
@@ -401,6 +401,7 @@ function buildLiveGatewayConfig(params: {
|
||||
...providerOverrides,
|
||||
};
|
||||
const providers = Object.keys(nextProviders).length > 0 ? nextProviders : baseProviders;
|
||||
const baseModels = params.cfg.models;
|
||||
return {
|
||||
...params.cfg,
|
||||
agents: {
|
||||
@@ -418,7 +419,9 @@ function buildLiveGatewayConfig(params: {
|
||||
},
|
||||
},
|
||||
models:
|
||||
Object.keys(providers).length > 0 ? { ...params.cfg.models, providers } : params.cfg.models,
|
||||
Object.keys(providers).length > 0
|
||||
? ({ ...baseModels, providers } as ModelsConfig)
|
||||
: baseModels,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1149,10 +1152,10 @@ describeLive("gateway live (dev agent, profile keys)", () => {
|
||||
await fs.writeFile(toolProbePath, `nonceA=${nonceA}\nnonceB=${nonceB}\n`);
|
||||
|
||||
const port = await getFreeGatewayPort();
|
||||
const server = await startGatewayServer({
|
||||
configPath: cfg.__meta?.path,
|
||||
port,
|
||||
token,
|
||||
const server = await startGatewayServer(port, {
|
||||
bind: "loopback",
|
||||
auth: { mode: "token", token },
|
||||
controlUiEnabled: false,
|
||||
});
|
||||
|
||||
const client = await connectClient({
|
||||
|
||||
Reference in New Issue
Block a user