@revojs/ai 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ declare const _default: {
2
+ setup: (scope: import("revojs").Scope) => {
3
+ textGenerate: {
4
+ "gpt-5.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
5
+ "gpt-5.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
6
+ "gpt-5.4": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
7
+ "gpt-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
8
+ "gpt-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
9
+ "gpt-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
10
+ "gpt-5-mini": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
11
+ "gpt-5-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
12
+ "gpt-4.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
13
+ "gpt-4o": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
14
+ };
15
+ textStream: {
16
+ "gpt-5.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
17
+ "gpt-5.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
18
+ "gpt-5.4": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
19
+ "gpt-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
20
+ "gpt-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
21
+ "gpt-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
22
+ "gpt-5-mini": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
23
+ "gpt-5-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
24
+ "gpt-4.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
25
+ "gpt-4o": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
26
+ };
27
+ };
28
+ };
29
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { defineProvider } from "../index.js";
2
+ import { chatCompletionsGenerateProtocol, chatCompletionsStreamProtocol } from "../protocols/openai-chat-completions.js";
3
+ import { useVariables } from "revojs";
4
+ //#region src/providers/openai.ts
5
+ var openai_default = defineProvider({ setup: (scope) => {
6
+ const config = {
7
+ baseURL: "https://api.openai.com/v1",
8
+ apiKey: useVariables(scope).openaiApiKey
9
+ };
10
+ const chatCompletionsGenerate = chatCompletionsGenerateProtocol(config);
11
+ const chatCompletionsStream = chatCompletionsStreamProtocol(config);
12
+ return {
13
+ textGenerate: {
14
+ "gpt-5.6": chatCompletionsGenerate,
15
+ "gpt-5.5": chatCompletionsGenerate,
16
+ "gpt-5.4": chatCompletionsGenerate,
17
+ "gpt-5.2": chatCompletionsGenerate,
18
+ "gpt-5.1": chatCompletionsGenerate,
19
+ "gpt-5": chatCompletionsGenerate,
20
+ "gpt-5-mini": chatCompletionsGenerate,
21
+ "gpt-5-nano": chatCompletionsGenerate,
22
+ "gpt-4.1": chatCompletionsGenerate,
23
+ "gpt-4o": chatCompletionsGenerate
24
+ },
25
+ textStream: {
26
+ "gpt-5.6": chatCompletionsStream,
27
+ "gpt-5.5": chatCompletionsStream,
28
+ "gpt-5.4": chatCompletionsStream,
29
+ "gpt-5.2": chatCompletionsStream,
30
+ "gpt-5.1": chatCompletionsStream,
31
+ "gpt-5": chatCompletionsStream,
32
+ "gpt-5-mini": chatCompletionsStream,
33
+ "gpt-5-nano": chatCompletionsStream,
34
+ "gpt-4.1": chatCompletionsStream,
35
+ "gpt-4o": chatCompletionsStream
36
+ }
37
+ };
38
+ } });
39
+ //#endregion
40
+ export { openai_default as default };
@@ -0,0 +1,163 @@
1
+ declare const _default: {
2
+ setup: (scope: import("revojs").Scope) => {
3
+ textGenerate: {
4
+ "big-pickle": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
5
+ "kimi-k3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
6
+ "kimi-k2.7-code": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
7
+ "kimi-k2.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
8
+ "glm-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
9
+ "glm-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
10
+ "minimax-m3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
11
+ "minimax-m2.7": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
12
+ "deepseek-v4-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
13
+ "deepseek-v4-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
14
+ "grok-code": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
15
+ "mimo-v2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
16
+ "mimo-v2-pro-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
17
+ "mimo-v2-omni-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
18
+ "mimo-v2-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
19
+ "hy3-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
20
+ "hy3-preview-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
21
+ "ling-3.0-flash-fin-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
22
+ "ling-3.0-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
23
+ "ling-3.0-tiny-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
24
+ "ling-2.6-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
25
+ "nemotron-3-ultra-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
26
+ "nemotron-3-super-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
27
+ "nemotron-3.5-lightning-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
28
+ "deepseek-v4-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
29
+ "minimax-m3-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
30
+ "minimax-m2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
31
+ "minimax-m2.1-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
32
+ "glm-5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
33
+ "glm-4.7-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
34
+ "kimi-k2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
35
+ "north-mini-code-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
36
+ "ring-2.6-1t-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
37
+ "laguna-s-2.1-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
38
+ "longcat-2.0-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
39
+ "trinity-large-preview-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
40
+ "x-preview-f-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
41
+ "gpt-5.6-sol": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
42
+ "gpt-5.6-terra": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
43
+ "gpt-5.6-luna": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
44
+ "gpt-5.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
45
+ "gpt-5.5-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
46
+ "gpt-5.4": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
47
+ "gpt-5.4-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
48
+ "gpt-5.4-mini": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
49
+ "gpt-5.4-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
50
+ "gpt-5.3-codex": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
51
+ "gpt-5.3-codex-spark": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
52
+ "gpt-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
53
+ "gpt-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
54
+ "gpt-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
55
+ "gpt-5-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
56
+ "grok-4.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
57
+ "grok-4.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
58
+ "grok-build-0.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
59
+ "muse-spark-1.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
60
+ "muse-spark-1.2-contributor-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
61
+ "claude-fable-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
62
+ "claude-opus-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
63
+ "claude-opus-4-8": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
64
+ "claude-opus-4-7": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
65
+ "claude-opus-4-6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
66
+ "claude-opus-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
67
+ "claude-sonnet-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
68
+ "claude-sonnet-4-6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
69
+ "claude-sonnet-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
70
+ "claude-haiku-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
71
+ "qwen3.7-max": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
72
+ "qwen3.7-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
73
+ "qwen3.6-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
74
+ "qwen3.5-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
75
+ "gemini-3.7-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
76
+ "gemini-3.6-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
77
+ "gemini-3.5-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
78
+ "gemini-3.5-flash-lite": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
79
+ "gemini-3.1-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
80
+ "gemini-3-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
81
+ };
82
+ textStream: {
83
+ "big-pickle": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
84
+ "kimi-k3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
85
+ "kimi-k2.7-code": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
86
+ "kimi-k2.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
87
+ "glm-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
88
+ "glm-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
89
+ "minimax-m3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
90
+ "minimax-m2.7": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
91
+ "deepseek-v4-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
92
+ "deepseek-v4-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
93
+ "grok-code": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
94
+ "mimo-v2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
95
+ "mimo-v2-pro-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
96
+ "mimo-v2-omni-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
97
+ "mimo-v2-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
98
+ "hy3-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
99
+ "hy3-preview-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
100
+ "ling-3.0-flash-fin-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
101
+ "ling-3.0-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
102
+ "ling-3.0-tiny-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
103
+ "ling-2.6-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
104
+ "nemotron-3-ultra-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
105
+ "nemotron-3-super-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
106
+ "nemotron-3.5-lightning-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
107
+ "deepseek-v4-flash-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
108
+ "minimax-m3-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
109
+ "minimax-m2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
110
+ "minimax-m2.1-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
111
+ "glm-5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
112
+ "glm-4.7-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
113
+ "kimi-k2.5-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
114
+ "north-mini-code-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
115
+ "ring-2.6-1t-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
116
+ "laguna-s-2.1-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
117
+ "longcat-2.0-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
118
+ "trinity-large-preview-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
119
+ "x-preview-f-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
120
+ "gpt-5.6-sol": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
121
+ "gpt-5.6-terra": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
122
+ "gpt-5.6-luna": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
123
+ "gpt-5.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
124
+ "gpt-5.5-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
125
+ "gpt-5.4": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
126
+ "gpt-5.4-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
127
+ "gpt-5.4-mini": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
128
+ "gpt-5.4-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
129
+ "gpt-5.3-codex": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
130
+ "gpt-5.3-codex-spark": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
131
+ "gpt-5.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
132
+ "gpt-5.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
133
+ "gpt-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
134
+ "gpt-5-nano": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
135
+ "grok-4.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
136
+ "grok-4.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
137
+ "grok-build-0.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
138
+ "muse-spark-1.2": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
139
+ "muse-spark-1.2-contributor-free": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
140
+ "claude-fable-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
141
+ "claude-opus-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
142
+ "claude-opus-4-8": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
143
+ "claude-opus-4-7": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
144
+ "claude-opus-4-6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
145
+ "claude-opus-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
146
+ "claude-sonnet-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
147
+ "claude-sonnet-4-6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
148
+ "claude-sonnet-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
149
+ "claude-haiku-4-5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
150
+ "qwen3.7-max": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
151
+ "qwen3.7-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
152
+ "qwen3.6-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
153
+ "qwen3.5-plus": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
154
+ "gemini-3.7-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
155
+ "gemini-3.6-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
156
+ "gemini-3.5-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
157
+ "gemini-3.5-flash-lite": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
158
+ "gemini-3.1-pro": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
159
+ "gemini-3-flash": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
160
+ };
161
+ };
162
+ };
163
+ export default _default;
@@ -0,0 +1,183 @@
1
+ import { defineProvider } from "../index.js";
2
+ import { messagesGenerateProtocol, messagesStreamProtocol } from "../protocols/anthropic-messages.js";
3
+ import { chatCompletionsGenerateProtocol, chatCompletionsStreamProtocol } from "../protocols/openai-chat-completions.js";
4
+ import { geminiGenerateProtocol, geminiStreamProtocol } from "../protocols/google-models.js";
5
+ import { responsesGenerateProtocol, responsesStreamProtocol } from "../protocols/openai-responses.js";
6
+ import { useVariables } from "revojs";
7
+ //#region src/providers/opencode.ts
8
+ var opencode_default = defineProvider({ setup: (scope) => {
9
+ const config = {
10
+ baseURL: "https://opencode.ai/zen/v1",
11
+ apiKey: useVariables(scope).opencodeApiKey
12
+ };
13
+ const chatCompletionsGenerate = chatCompletionsGenerateProtocol(config);
14
+ const chatCompletionsStream = chatCompletionsStreamProtocol(config);
15
+ const responsesGenerate = responsesGenerateProtocol(config);
16
+ const responsesStream = responsesStreamProtocol(config);
17
+ const messagesGenerate = messagesGenerateProtocol(config);
18
+ const messagesStream = messagesStreamProtocol(config);
19
+ const geminiGenerate = geminiGenerateProtocol(config);
20
+ const geminiStream = geminiStreamProtocol(config);
21
+ return {
22
+ textGenerate: {
23
+ "big-pickle": chatCompletionsGenerate,
24
+ "kimi-k3": chatCompletionsGenerate,
25
+ "kimi-k2.7-code": chatCompletionsGenerate,
26
+ "kimi-k2.6": chatCompletionsGenerate,
27
+ "glm-5.2": chatCompletionsGenerate,
28
+ "glm-5.1": chatCompletionsGenerate,
29
+ "minimax-m3": chatCompletionsGenerate,
30
+ "minimax-m2.7": chatCompletionsGenerate,
31
+ "deepseek-v4-pro": chatCompletionsGenerate,
32
+ "deepseek-v4-flash": chatCompletionsGenerate,
33
+ "grok-code": chatCompletionsGenerate,
34
+ "mimo-v2.5-free": chatCompletionsGenerate,
35
+ "mimo-v2-pro-free": chatCompletionsGenerate,
36
+ "mimo-v2-omni-free": chatCompletionsGenerate,
37
+ "mimo-v2-flash-free": chatCompletionsGenerate,
38
+ "hy3-free": chatCompletionsGenerate,
39
+ "hy3-preview-free": chatCompletionsGenerate,
40
+ "ling-3.0-flash-fin-free": chatCompletionsGenerate,
41
+ "ling-3.0-flash-free": chatCompletionsGenerate,
42
+ "ling-3.0-tiny-free": chatCompletionsGenerate,
43
+ "ling-2.6-flash-free": chatCompletionsGenerate,
44
+ "nemotron-3-ultra-free": chatCompletionsGenerate,
45
+ "nemotron-3-super-free": chatCompletionsGenerate,
46
+ "nemotron-3.5-lightning-free": chatCompletionsGenerate,
47
+ "deepseek-v4-flash-free": chatCompletionsGenerate,
48
+ "minimax-m3-free": chatCompletionsGenerate,
49
+ "minimax-m2.5-free": chatCompletionsGenerate,
50
+ "minimax-m2.1-free": chatCompletionsGenerate,
51
+ "glm-5-free": chatCompletionsGenerate,
52
+ "glm-4.7-free": chatCompletionsGenerate,
53
+ "kimi-k2.5-free": chatCompletionsGenerate,
54
+ "north-mini-code-free": chatCompletionsGenerate,
55
+ "ring-2.6-1t-free": chatCompletionsGenerate,
56
+ "laguna-s-2.1-free": chatCompletionsGenerate,
57
+ "longcat-2.0-free": chatCompletionsGenerate,
58
+ "trinity-large-preview-free": chatCompletionsGenerate,
59
+ "x-preview-f-free": chatCompletionsGenerate,
60
+ "gpt-5.6-sol": responsesGenerate,
61
+ "gpt-5.6-terra": responsesGenerate,
62
+ "gpt-5.6-luna": responsesGenerate,
63
+ "gpt-5.5": responsesGenerate,
64
+ "gpt-5.5-pro": responsesGenerate,
65
+ "gpt-5.4": responsesGenerate,
66
+ "gpt-5.4-pro": responsesGenerate,
67
+ "gpt-5.4-mini": responsesGenerate,
68
+ "gpt-5.4-nano": responsesGenerate,
69
+ "gpt-5.3-codex": responsesGenerate,
70
+ "gpt-5.3-codex-spark": responsesGenerate,
71
+ "gpt-5.2": responsesGenerate,
72
+ "gpt-5.1": responsesGenerate,
73
+ "gpt-5": responsesGenerate,
74
+ "gpt-5-nano": responsesGenerate,
75
+ "grok-4.6": responsesGenerate,
76
+ "grok-4.5": responsesGenerate,
77
+ "grok-build-0.1": responsesGenerate,
78
+ "muse-spark-1.2": responsesGenerate,
79
+ "muse-spark-1.2-contributor-free": responsesGenerate,
80
+ "claude-fable-5": messagesGenerate,
81
+ "claude-opus-5": messagesGenerate,
82
+ "claude-opus-4-8": messagesGenerate,
83
+ "claude-opus-4-7": messagesGenerate,
84
+ "claude-opus-4-6": messagesGenerate,
85
+ "claude-opus-4-5": messagesGenerate,
86
+ "claude-sonnet-5": messagesGenerate,
87
+ "claude-sonnet-4-6": messagesGenerate,
88
+ "claude-sonnet-4-5": messagesGenerate,
89
+ "claude-haiku-4-5": messagesGenerate,
90
+ "qwen3.7-max": messagesGenerate,
91
+ "qwen3.7-plus": messagesGenerate,
92
+ "qwen3.6-plus": messagesGenerate,
93
+ "qwen3.5-plus": messagesGenerate,
94
+ "gemini-3.7-flash": geminiGenerate,
95
+ "gemini-3.6-flash": geminiGenerate,
96
+ "gemini-3.5-flash": geminiGenerate,
97
+ "gemini-3.5-flash-lite": geminiGenerate,
98
+ "gemini-3.1-pro": geminiGenerate,
99
+ "gemini-3-flash": geminiGenerate
100
+ },
101
+ textStream: {
102
+ "big-pickle": chatCompletionsStream,
103
+ "kimi-k3": chatCompletionsStream,
104
+ "kimi-k2.7-code": chatCompletionsStream,
105
+ "kimi-k2.6": chatCompletionsStream,
106
+ "glm-5.2": chatCompletionsStream,
107
+ "glm-5.1": chatCompletionsStream,
108
+ "minimax-m3": chatCompletionsStream,
109
+ "minimax-m2.7": chatCompletionsStream,
110
+ "deepseek-v4-pro": chatCompletionsStream,
111
+ "deepseek-v4-flash": chatCompletionsStream,
112
+ "grok-code": chatCompletionsStream,
113
+ "mimo-v2.5-free": chatCompletionsStream,
114
+ "mimo-v2-pro-free": chatCompletionsStream,
115
+ "mimo-v2-omni-free": chatCompletionsStream,
116
+ "mimo-v2-flash-free": chatCompletionsStream,
117
+ "hy3-free": chatCompletionsStream,
118
+ "hy3-preview-free": chatCompletionsStream,
119
+ "ling-3.0-flash-fin-free": chatCompletionsStream,
120
+ "ling-3.0-flash-free": chatCompletionsStream,
121
+ "ling-3.0-tiny-free": chatCompletionsStream,
122
+ "ling-2.6-flash-free": chatCompletionsStream,
123
+ "nemotron-3-ultra-free": chatCompletionsStream,
124
+ "nemotron-3-super-free": chatCompletionsStream,
125
+ "nemotron-3.5-lightning-free": chatCompletionsStream,
126
+ "deepseek-v4-flash-free": chatCompletionsStream,
127
+ "minimax-m3-free": chatCompletionsStream,
128
+ "minimax-m2.5-free": chatCompletionsStream,
129
+ "minimax-m2.1-free": chatCompletionsStream,
130
+ "glm-5-free": chatCompletionsStream,
131
+ "glm-4.7-free": chatCompletionsStream,
132
+ "kimi-k2.5-free": chatCompletionsStream,
133
+ "north-mini-code-free": chatCompletionsStream,
134
+ "ring-2.6-1t-free": chatCompletionsStream,
135
+ "laguna-s-2.1-free": chatCompletionsStream,
136
+ "longcat-2.0-free": chatCompletionsStream,
137
+ "trinity-large-preview-free": chatCompletionsStream,
138
+ "x-preview-f-free": chatCompletionsStream,
139
+ "gpt-5.6-sol": responsesStream,
140
+ "gpt-5.6-terra": responsesStream,
141
+ "gpt-5.6-luna": responsesStream,
142
+ "gpt-5.5": responsesStream,
143
+ "gpt-5.5-pro": responsesStream,
144
+ "gpt-5.4": responsesStream,
145
+ "gpt-5.4-pro": responsesStream,
146
+ "gpt-5.4-mini": responsesStream,
147
+ "gpt-5.4-nano": responsesStream,
148
+ "gpt-5.3-codex": responsesStream,
149
+ "gpt-5.3-codex-spark": responsesStream,
150
+ "gpt-5.2": responsesStream,
151
+ "gpt-5.1": responsesStream,
152
+ "gpt-5": responsesStream,
153
+ "gpt-5-nano": responsesStream,
154
+ "grok-4.6": responsesStream,
155
+ "grok-4.5": responsesStream,
156
+ "grok-build-0.1": responsesStream,
157
+ "muse-spark-1.2": responsesStream,
158
+ "muse-spark-1.2-contributor-free": responsesStream,
159
+ "claude-fable-5": messagesStream,
160
+ "claude-opus-5": messagesStream,
161
+ "claude-opus-4-8": messagesStream,
162
+ "claude-opus-4-7": messagesStream,
163
+ "claude-opus-4-6": messagesStream,
164
+ "claude-opus-4-5": messagesStream,
165
+ "claude-sonnet-5": messagesStream,
166
+ "claude-sonnet-4-6": messagesStream,
167
+ "claude-sonnet-4-5": messagesStream,
168
+ "claude-haiku-4-5": messagesStream,
169
+ "qwen3.7-max": messagesStream,
170
+ "qwen3.7-plus": messagesStream,
171
+ "qwen3.6-plus": messagesStream,
172
+ "qwen3.5-plus": messagesStream,
173
+ "gemini-3.7-flash": geminiStream,
174
+ "gemini-3.6-flash": geminiStream,
175
+ "gemini-3.5-flash": geminiStream,
176
+ "gemini-3.5-flash-lite": geminiStream,
177
+ "gemini-3.1-pro": geminiStream,
178
+ "gemini-3-flash": geminiStream
179
+ }
180
+ };
181
+ } });
182
+ //#endregion
183
+ export { opencode_default as default };
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ setup: (scope: import("revojs").Scope) => {
3
+ textGenerate: {
4
+ "grok-4.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
5
+ "grok-4.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
6
+ "grok-4.3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
7
+ "grok-build-0.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelGenerateResult>;
8
+ };
9
+ textStream: {
10
+ "grok-4.6": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
11
+ "grok-4.5": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
12
+ "grok-4.3": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
13
+ "grok-build-0.1": import("../index").Protocol<import("../index").LanguageModelCallOptions<string>, import("../index").LanguageModelStreamResult>;
14
+ };
15
+ };
16
+ };
17
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { defineProvider } from "../index.js";
2
+ import { chatCompletionsGenerateProtocol, chatCompletionsStreamProtocol } from "../protocols/openai-chat-completions.js";
3
+ import { useVariables } from "revojs";
4
+ //#region src/providers/xai.ts
5
+ var xai_default = defineProvider({ setup: (scope) => {
6
+ const config = {
7
+ baseURL: "https://api.x.ai/v1",
8
+ apiKey: useVariables(scope).xaiApiKey
9
+ };
10
+ const chatCompletionsGenerate = chatCompletionsGenerateProtocol(config);
11
+ const chatCompletionsStream = chatCompletionsStreamProtocol(config);
12
+ return {
13
+ textGenerate: {
14
+ "grok-4.6": chatCompletionsGenerate,
15
+ "grok-4.5": chatCompletionsGenerate,
16
+ "grok-4.3": chatCompletionsGenerate,
17
+ "grok-build-0.1": chatCompletionsGenerate
18
+ },
19
+ textStream: {
20
+ "grok-4.6": chatCompletionsStream,
21
+ "grok-4.5": chatCompletionsStream,
22
+ "grok-4.3": chatCompletionsStream,
23
+ "grok-build-0.1": chatCompletionsStream
24
+ }
25
+ };
26
+ } });
27
+ //#endregion
28
+ export { xai_default as default };
@@ -0,0 +1,14 @@
1
+ declare module "#config/ai" {
2
+ import type { AiConfig } from "@revojs/ai/module";
3
+
4
+ const config: AiConfig;
5
+ export default config;
6
+ }
7
+
8
+ declare module "#providers" {
9
+ import type { Source } from "revojs";
10
+ import type { Provider } from "../draft";
11
+
12
+ const entries: Source<Provider>;
13
+ export default entries;
14
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@revojs/ai",
3
+ "version": "0.1.58",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/tellua/revojs.git"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "type": "module",
13
+ "main": "./dist/index.js",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./module": {
22
+ "types": "./dist/module/index.d.ts",
23
+ "import": "./dist/module/index.js"
24
+ }
25
+ },
26
+ "scripts": {
27
+ "build": "vite build",
28
+ "typecheck": "tsc --noEmit -p tsconfig.json",
29
+ "watch": "vite build --watch"
30
+ },
31
+ "dependencies": {
32
+ "revojs": "*"
33
+ },
34
+ "devDependencies": {
35
+ "@revojs/tsconfig": "*"
36
+ }
37
+ }