Skip to content

Commit 4366c61

Browse files
[Inference Providers] Fix LoRAs (#1592)
`adapter` and `adapterWeightsPath` were left out when normalizing inference provider mappings. This should fix LoRAs support. cc @Vaibhavs10
1 parent 04b419c commit 4366c61

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/inference/src/lib/getInferenceProviderMapping.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ function normalizeInferenceProviderMapping(
1818
modelId: ModelId,
1919
inferenceProviderMapping?:
2020
| InferenceProviderMappingEntry[]
21-
| Record<string, { providerId: string; status: "live" | "staging"; task: WidgetType }>
21+
| Record<
22+
string,
23+
{
24+
providerId: string;
25+
status: "live" | "staging";
26+
task: WidgetType;
27+
adapter?: string;
28+
adapterWeightsPath?: string;
29+
}
30+
>
2231
): InferenceProviderMappingEntry[] {
2332
if (!inferenceProviderMapping) {
2433
return [];
@@ -36,6 +45,8 @@ function normalizeInferenceProviderMapping(
3645
providerId: mapping.providerId,
3746
status: mapping.status,
3847
task: mapping.task,
48+
adapter: mapping.adapter,
49+
adapterWeightsPath: mapping.adapterWeightsPath,
3950
}));
4051
}
4152

0 commit comments

Comments
 (0)