Files
openclaw/scripts/e2e/docker-openai-seed.ts
Peter Steinberger fa77fe10d5 chore: migrate active GPT-5.5 references to GPT-5.6 (#104452)
* chore(models): migrate active GPT-5.5 references

* test(workboard): expect GPT-5.6 Sol default

* chore: keep release notes in PR body

* test(models): align picker fixtures with Sol default

* test: update PDF default model expectation

* test(qa): migrate thinking smoke to Luna

* test(gateway): align mock catalog with Sol default

* ci: retrigger exact-head PR checks

* test(gateway): document default catalog invariant
2026-07-11 06:30:57 -07:00

50 lines
1.5 KiB
TypeScript

// Shared Docker E2E OpenAI provider config seed helper.
// Uses packaged plugin-sdk runtime modules so seeded configs match the npm tarball.
import {
applyProviderConfigWithDefaultModelPreset,
type ModelDefinitionConfig,
type OpenClawConfig,
} from "../../dist/plugin-sdk/provider-onboard.js";
export type { OpenClawConfig };
const DOCKER_OPENAI_MODEL_REF = "openai/gpt-5.6-luna";
const DOCKER_OPENAI_BASE_URL =
process.env.OPENCLAW_DOCKER_OPENAI_BASE_URL?.trim() || "http://127.0.0.1:9/v1";
const DOCKER_OPENAI_MODEL: ModelDefinitionConfig = {
id: "gpt-5.6-luna",
name: "gpt-5.6-luna",
api: "openai-responses",
reasoning: true,
input: ["text", "image"],
cost: {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 1_050_000,
maxTokens: 128_000,
};
export function applyDockerOpenAiProviderConfig(
config: OpenClawConfig,
apiKey: string,
): OpenClawConfig {
const seededConfig = applyProviderConfigWithDefaultModelPreset(config, {
providerId: "openai",
api: "openai-responses",
baseUrl: DOCKER_OPENAI_BASE_URL,
defaultModel: DOCKER_OPENAI_MODEL,
defaultModelId: DOCKER_OPENAI_MODEL.id,
aliases: [{ modelRef: DOCKER_OPENAI_MODEL_REF, alias: "GPT" }],
primaryModelRef: DOCKER_OPENAI_MODEL_REF,
});
const openAiProvider = seededConfig.models?.providers?.openai;
if (!openAiProvider) {
throw new Error("failed to seed OpenAI provider config");
}
openAiProvider.apiKey = apiKey;
return seededConfig;
}