We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b3e2cf commit 712ed1fCopy full SHA for 712ed1f
packages/inference/src/lib/makeRequestOptions.ts
@@ -35,6 +35,12 @@ export async function makeRequestOptions(
35
if (maybeModel && isUrl(maybeModel)) {
36
throw new Error(`Model URLs are no longer supported. Use endpointUrl instead.`);
37
}
38
+
39
+ if (args.endpointUrl) {
40
+ // No need to have maybeModel, or to load default model for a task
41
+ return makeRequestOptionsFromResolvedModel(args.endpointUrl, args, options);
42
+ }
43
44
if (!maybeModel && !task) {
45
throw new Error("No model provided, and no task has been specified.");
46
0 commit comments