Skip to content

Commit 0380c23

Browse files
committed
feat: Add OpenRouter provider and models
1 parent 7ad2cac commit 0380c23

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

core/src/core/models.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,27 @@ type Models = {
99
[ModelProvider.LLAMALOCAL]: Model;
1010
[ModelProvider.GOOGLE]: Model;
1111
[ModelProvider.CLAUDE_VERTEX]: Model;
12-
// TODO: add OpenRouter - feel free to do this :)
12+
[ModelProvider.OPENROUTER]: Model;
1313
};
1414

1515
const models: Models = {
16+
[ModelProvider.OPENROUTER]: {
17+
endpoint: "https://openrouter.ai/api/v1",
18+
settings: {
19+
stop: [],
20+
maxInputTokens: 128000,
21+
maxOutputTokens: 4096,
22+
frequency_penalty: 0.0,
23+
presence_penalty: 0.0,
24+
temperature: 0.7,
25+
},
26+
model: {
27+
[ModelClass.SMALL]: "mistralai/mistral-7b-instruct",
28+
[ModelClass.MEDIUM]: "anthropic/claude-2",
29+
[ModelClass.LARGE]: "anthropic/claude-2",
30+
[ModelClass.EMBEDDING]: "openai/text-embedding-ada-002",
31+
},
32+
},
1633
[ModelProvider.OPENAI]: {
1734
endpoint: "https://api.openai.com/v1",
1835
settings: {

0 commit comments

Comments
 (0)