mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-05-01 06:36:23 +08:00
fix: register google vertex setup provider
This commit is contained in:
21
extensions/google/setup-api.test.ts
Normal file
21
extensions/google/setup-api.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import setupEntry from "./setup-api.js";
|
||||
|
||||
describe("google setup entry", () => {
|
||||
it("registers setup runtime providers declared by the manifest", () => {
|
||||
const providerIds: string[] = [];
|
||||
const cliBackendIds: string[] = [];
|
||||
|
||||
setupEntry.register({
|
||||
registerProvider(provider) {
|
||||
providerIds.push(provider.id);
|
||||
},
|
||||
registerCliBackend(backend) {
|
||||
cliBackendIds.push(backend.id);
|
||||
},
|
||||
} as never);
|
||||
|
||||
expect(providerIds).toContain("google-vertex");
|
||||
expect(cliBackendIds).toContain("google-gemini-cli");
|
||||
});
|
||||
});
|
||||
@@ -1,11 +1,13 @@
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { buildGoogleGeminiCliBackend } from "./cli-backend.js";
|
||||
import { createGoogleVertexProvider } from "./provider-contract-api.js";
|
||||
|
||||
export default definePluginEntry({
|
||||
id: "google",
|
||||
name: "Google Setup",
|
||||
description: "Lightweight Google setup hooks",
|
||||
register(api) {
|
||||
api.registerProvider(createGoogleVertexProvider());
|
||||
api.registerCliBackend(buildGoogleGeminiCliBackend());
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user