feat(FN-2962): merge fusion/fn-2962
- Add changeset for `@runfusion/fusion` minor release introducing custom provider registration support Commits merged: - feat(FN-2962): complete Step 8 — add changeset and documentation Files changed: .changeset/register-custom-providers.md | 5 +++++ 1 file changed, 5 insertions(+) Fusion-Task-Id: FN-2962
This commit is contained in:
@@ -746,7 +746,14 @@ export function ModelOnboardingModal({
|
||||
const loadCustomProviders = useCallback(async () => {
|
||||
try {
|
||||
const data = await fetchCustomProviders();
|
||||
setCustomProviders(data.providers ?? []);
|
||||
setCustomProviders((data.providers ?? []).map((provider) => ({
|
||||
id: provider.id,
|
||||
name: provider.name,
|
||||
baseUrl: provider.baseUrl,
|
||||
api: provider.apiType === "anthropic-compatible" ? "anthropic-messages" : "openai-completions",
|
||||
apiKey: provider.apiKey,
|
||||
models: (provider.models ?? []).map((model) => ({ id: model.id, name: model.name })),
|
||||
})));
|
||||
} catch {
|
||||
// best effort
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user