mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:20:43 +00:00
fix(onboarding): surface official plugin installs
This commit is contained in:
@@ -300,6 +300,24 @@ describe("codex provider", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("exposes a setup auth choice for installing Codex as an external provider", async () => {
|
||||
const provider = buildCodexProvider();
|
||||
|
||||
expect(provider.auth[0]).toMatchObject({
|
||||
id: "app-server",
|
||||
kind: "custom",
|
||||
wizard: {
|
||||
choiceId: "codex",
|
||||
choiceLabel: "Codex app-server",
|
||||
onboardingScopes: ["text-inference"],
|
||||
},
|
||||
});
|
||||
await expect(provider.auth[0].run({} as never)).resolves.toMatchObject({
|
||||
profiles: [],
|
||||
defaultModel: "codex/gpt-5.5",
|
||||
});
|
||||
});
|
||||
|
||||
it("exposes a lightweight provider-discovery entry for model list/status", async () => {
|
||||
expect(codexProviderDiscovery.id).toBe("codex");
|
||||
expect(codexProviderDiscovery.resolveSyntheticAuth?.({ provider: "codex" })).toEqual({
|
||||
|
||||
@@ -28,6 +28,8 @@ import type {
|
||||
const DEFAULT_DISCOVERY_TIMEOUT_MS = 2500;
|
||||
const LIVE_DISCOVERY_ENV = "OPENCLAW_CODEX_DISCOVERY_LIVE";
|
||||
const MODEL_DISCOVERY_PAGE_LIMIT = 100;
|
||||
const CODEX_APP_SERVER_SETUP_METHOD_ID = "app-server";
|
||||
const CODEX_DEFAULT_MODEL_REF = `${CODEX_PROVIDER_ID}/${FALLBACK_CODEX_MODELS[0].id}`;
|
||||
const codexCatalogLog = createSubsystemLogger("codex/catalog");
|
||||
|
||||
type CodexModelLister = (options: {
|
||||
@@ -55,7 +57,25 @@ export function buildCodexProvider(options: BuildCodexProviderOptions = {}): Pro
|
||||
id: CODEX_PROVIDER_ID,
|
||||
label: "Codex",
|
||||
docsPath: "/providers/models",
|
||||
auth: [],
|
||||
auth: [
|
||||
{
|
||||
id: CODEX_APP_SERVER_SETUP_METHOD_ID,
|
||||
label: "Codex app-server",
|
||||
hint: "Use the Codex app-server runtime and managed model catalog.",
|
||||
kind: "custom",
|
||||
wizard: {
|
||||
choiceId: CODEX_PROVIDER_ID,
|
||||
choiceLabel: "Codex app-server",
|
||||
choiceHint: "Use the Codex app-server runtime and managed model catalog.",
|
||||
assistantPriority: -40,
|
||||
groupId: CODEX_PROVIDER_ID,
|
||||
groupLabel: "Codex",
|
||||
groupHint: "Codex app-server model provider",
|
||||
onboardingScopes: ["text-inference"],
|
||||
},
|
||||
run: async () => ({ profiles: [], defaultModel: CODEX_DEFAULT_MODEL_REF }),
|
||||
},
|
||||
],
|
||||
catalog: {
|
||||
order: "late",
|
||||
run: async (ctx) => {
|
||||
|
||||
Reference in New Issue
Block a user