Add getApiKey to web-ui example Agent config

Provides API keys from the provider keys store, matching old ProviderTransport behavior.
This commit is contained in:
Mario Zechner 2025-12-28 11:18:54 +01:00
parent 3bf168615a
commit 977e4ea6ef

View file

@ -176,6 +176,11 @@ Feel free to use these tools when needed to provide accurate and helpful respons
},
// Custom transformer: convert custom messages to LLM-compatible format
convertToLlm: customConvertToLlm,
// Get API keys from provider keys store
getApiKey: async (provider: string) => {
const key = await storage.providerKeys.get(provider);
return key ?? undefined;
},
});
agentUnsubscribe = agent.subscribe((event: any) => {