Skip to content

Commit edc3fa5

Browse files
authored
fix(providers-cloud/openrouter): add model provider (#97)
1 parent e077b33 commit edc3fa5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages-ext/providers-cloud/src/providers/openrouter.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ChatProviderWithExtraOptions } from '@xsai-ext/shared-providers'
22
import type { CommonRequestOptions } from '@xsai/shared'
33

4-
import { createMetadataProvider, merge } from '@xsai-ext/shared-providers'
4+
import { createMetadataProvider, createModelProvider, merge } from '@xsai-ext/shared-providers'
55
import { objCamelToSnake } from '@xsai/shared'
66

77
export interface OpenRouterOptions {
@@ -129,4 +129,5 @@ export const createOpenRouter = (apiKey: string, baseURL = '') => merge(
129129
| 'openai/o1-preview',
130130
OpenRouterOptions
131131
>,
132+
createModelProvider({ apiKey, baseURL }),
132133
)

0 commit comments

Comments
 (0)