azerclaw 2.1.1 → 2.1.2
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.
- package/README.md +3 -3
- package/dist/src/agents/builtin.js +12 -12
- package/dist/src/cli/animations/fish.d.ts.map +1 -1
- package/dist/src/cli/animations/fish.js +10 -0
- package/dist/src/cli/animations/fish.js.map +1 -1
- package/dist/src/cli/commands/chat.d.ts +1 -1
- package/dist/src/cli/commands/chat.d.ts.map +1 -1
- package/dist/src/cli/commands/chat.js +16 -2
- package/dist/src/cli/commands/chat.js.map +1 -1
- package/dist/src/cli/commands/onboard.d.ts +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/tui.d.ts.map +1 -1
- package/dist/src/cli/commands/tui.js +15 -0
- package/dist/src/cli/commands/tui.js.map +1 -1
- package/dist/src/config/manager.d.ts +1 -1
- package/dist/src/config/manager.d.ts.map +1 -1
- package/dist/src/config/manager.js +6 -14
- package/dist/src/config/manager.js.map +1 -1
- package/dist/src/config/schema.d.ts +43 -791
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +40 -109
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/core/runtime.js +1 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/providers/openai.d.ts.map +1 -1
- package/dist/src/providers/openai.js +34 -14
- package/dist/src/providers/openai.js.map +1 -1
- package/dist/src/providers/router.d.ts +1 -2
- package/dist/src/providers/router.d.ts.map +1 -1
- package/dist/src/providers/router.js +37 -139
- package/dist/src/providers/router.js.map +1 -1
- package/dist/src/skills/loader.d.ts +1 -1
- package/dist/src/skills/loader.js +1 -1
- package/dist/src/tools/visual.d.ts.map +1 -1
- package/dist/src/tools/visual.js +1 -36
- package/dist/src/tools/visual.js.map +1 -1
- package/dist/src/workflow/engine.d.ts +1 -1
- package/dist/src/workflow/engine.js +1 -1
- package/package.json +1 -1
- package/dist/src/providers/anthropic.d.ts +0 -25
- package/dist/src/providers/anthropic.d.ts.map +0 -1
- package/dist/src/providers/anthropic.js +0 -163
- package/dist/src/providers/anthropic.js.map +0 -1
- package/dist/src/providers/google.d.ts +0 -23
- package/dist/src/providers/google.d.ts.map +0 -1
- package/dist/src/providers/google.js +0 -118
- package/dist/src/providers/google.js.map +0 -1
- package/dist/src/providers/ollama.d.ts +0 -24
- package/dist/src/providers/ollama.d.ts.map +0 -1
- package/dist/src/providers/ollama.js +0 -81
- package/dist/src/providers/ollama.js.map +0 -1
- package/dist/src/providers/openrouter.d.ts +0 -21
- package/dist/src/providers/openrouter.d.ts.map +0 -1
- package/dist/src/providers/openrouter.js +0 -65
- package/dist/src/providers/openrouter.js.map +0 -1
- package/dist/src/providers/vought.d.ts +0 -20
- package/dist/src/providers/vought.d.ts.map +0 -1
- package/dist/src/providers/vought.js +0 -35
- package/dist/src/providers/vought.js.map +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 🐟 AZERCLAW Google Gemini Provider
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.GoogleProvider = void 0;
|
|
7
|
-
const generative_ai_1 = require("@google/generative-ai");
|
|
8
|
-
const base_1 = require("./base");
|
|
9
|
-
class GoogleProvider extends base_1.BaseProvider {
|
|
10
|
-
name = 'google';
|
|
11
|
-
displayName = 'Google Gemini';
|
|
12
|
-
client;
|
|
13
|
-
defaultModel;
|
|
14
|
-
constructor(config) {
|
|
15
|
-
super();
|
|
16
|
-
this.defaultModel = config.defaultModel || 'gemini-2.5-flash';
|
|
17
|
-
this.client = new generative_ai_1.GoogleGenerativeAI(config.apiKey);
|
|
18
|
-
}
|
|
19
|
-
async isAvailable() {
|
|
20
|
-
const result = await this.validateConnection();
|
|
21
|
-
return result.valid;
|
|
22
|
-
}
|
|
23
|
-
async complete(options) {
|
|
24
|
-
const modelId = options.model || this.defaultModel;
|
|
25
|
-
try {
|
|
26
|
-
const model = this.client.getGenerativeModel({ model: modelId });
|
|
27
|
-
const systemPrompt = options.systemPrompt ||
|
|
28
|
-
options.messages.find(m => m.role === 'system')?.content || '';
|
|
29
|
-
const history = options.messages
|
|
30
|
-
.filter(m => m.role !== 'system')
|
|
31
|
-
.map(m => ({
|
|
32
|
-
role: m.role === 'assistant' ? 'model' : 'user',
|
|
33
|
-
parts: [{ text: m.content }],
|
|
34
|
-
}));
|
|
35
|
-
// Get the last user message
|
|
36
|
-
const lastMessage = history.pop();
|
|
37
|
-
if (!lastMessage) {
|
|
38
|
-
return { content: '', model: modelId, provider: this.name, finishReason: 'error' };
|
|
39
|
-
}
|
|
40
|
-
const chat = model.startChat({
|
|
41
|
-
history: history,
|
|
42
|
-
systemInstruction: systemPrompt ? { role: 'system', parts: [{ text: systemPrompt }] } : undefined,
|
|
43
|
-
});
|
|
44
|
-
const result = await chat.sendMessage(lastMessage.parts[0].text);
|
|
45
|
-
const response = result.response;
|
|
46
|
-
return {
|
|
47
|
-
content: response.text(),
|
|
48
|
-
model: modelId,
|
|
49
|
-
provider: this.name,
|
|
50
|
-
finishReason: 'stop',
|
|
51
|
-
usage: response.usageMetadata ? {
|
|
52
|
-
promptTokens: response.usageMetadata.promptTokenCount || 0,
|
|
53
|
-
completionTokens: response.usageMetadata.candidatesTokenCount || 0,
|
|
54
|
-
totalTokens: response.usageMetadata.totalTokenCount || 0,
|
|
55
|
-
} : undefined,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
return { content: '', model: modelId, provider: this.name, finishReason: 'error' };
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async *stream(options) {
|
|
63
|
-
const modelId = options.model || this.defaultModel;
|
|
64
|
-
try {
|
|
65
|
-
const model = this.client.getGenerativeModel({ model: modelId });
|
|
66
|
-
const systemPrompt = options.systemPrompt ||
|
|
67
|
-
options.messages.find(m => m.role === 'system')?.content || '';
|
|
68
|
-
const history = options.messages
|
|
69
|
-
.filter(m => m.role !== 'system')
|
|
70
|
-
.map(m => ({
|
|
71
|
-
role: m.role === 'assistant' ? 'model' : 'user',
|
|
72
|
-
parts: [{ text: m.content }],
|
|
73
|
-
}));
|
|
74
|
-
const lastMessage = history.pop();
|
|
75
|
-
if (!lastMessage) {
|
|
76
|
-
yield { type: 'error', error: 'No messages provided' };
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const chat = model.startChat({
|
|
80
|
-
history: history,
|
|
81
|
-
systemInstruction: systemPrompt ? { role: 'system', parts: [{ text: systemPrompt }] } : undefined,
|
|
82
|
-
});
|
|
83
|
-
const result = await chat.sendMessageStream(lastMessage.parts[0].text);
|
|
84
|
-
for await (const chunk of result.stream) {
|
|
85
|
-
const text = chunk.text();
|
|
86
|
-
if (text) {
|
|
87
|
-
yield { type: 'text', content: text };
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
yield { type: 'done' };
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
yield { type: 'error', error: error.message || 'Unknown error' };
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
async listModels() {
|
|
97
|
-
return [
|
|
98
|
-
{ id: 'gemini-2.5-pro', name: 'Gemini 2.5 Pro', provider: this.name, contextWindow: 1048576, supportsTools: true, supportsStreaming: true },
|
|
99
|
-
{ id: 'gemini-2.5-flash', name: 'Gemini 2.5 Flash', provider: this.name, contextWindow: 1048576, supportsTools: true, supportsStreaming: true },
|
|
100
|
-
{ id: 'gemini-2.0-flash', name: 'Gemini 2.0 Flash', provider: this.name, contextWindow: 1048576, supportsTools: true, supportsStreaming: true },
|
|
101
|
-
];
|
|
102
|
-
}
|
|
103
|
-
async validateConnection() {
|
|
104
|
-
try {
|
|
105
|
-
const model = this.client.getGenerativeModel({ model: this.defaultModel });
|
|
106
|
-
await model.generateContent('test');
|
|
107
|
-
return { valid: true };
|
|
108
|
-
}
|
|
109
|
-
catch (error) {
|
|
110
|
-
if (error.message?.includes('API_KEY')) {
|
|
111
|
-
return { valid: false, error: 'Invalid API key' };
|
|
112
|
-
}
|
|
113
|
-
return { valid: false, error: error.message || 'Connection failed' };
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
exports.GoogleProvider = GoogleProvider;
|
|
118
|
-
//# sourceMappingURL=google.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google.js","sourceRoot":"","sources":["../../../src/providers/google.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yDAA2D;AAC3D,iCAMgB;AAEhB,MAAa,cAAe,SAAQ,mBAAY;IACrC,IAAI,GAAG,QAAQ,CAAC;IAChB,WAAW,GAAG,eAAe,CAAC;IAC/B,MAAM,CAAqB;IAC3B,YAAY,CAAS;IAE7B,YAAY,MAAiD;QAC3D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,kBAAkB,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,kCAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC/C,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACvC,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC;QAEnD,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;YAEjE,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY;gBACvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,C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Chunk, ModelInfo } from './base';
|
|
5
|
-
export declare class OllamaProvider extends BaseProvider {
|
|
6
|
-
readonly name = "ollama";
|
|
7
|
-
readonly displayName = "Ollama (Local)";
|
|
8
|
-
private client;
|
|
9
|
-
private baseUrl;
|
|
10
|
-
private defaultModel;
|
|
11
|
-
constructor(config: {
|
|
12
|
-
baseUrl?: string;
|
|
13
|
-
defaultModel?: string;
|
|
14
|
-
});
|
|
15
|
-
isAvailable(): Promise<boolean>;
|
|
16
|
-
complete(options: CompletionOptions): Promise<CompletionResult>;
|
|
17
|
-
stream(options: CompletionOptions): AsyncGenerator<StreamChunk>;
|
|
18
|
-
listModels(): Promise<ModelInfo[]>;
|
|
19
|
-
validateConnection(): Promise<{
|
|
20
|
-
valid: boolean;
|
|
21
|
-
error?: string;
|
|
22
|
-
}>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=ollama.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../src/providers/ollama.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnG,qBAAa,cAAe,SAAQ,YAAY;IAC9C,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,WAAW,oBAAoB;IACxC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAOzD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAS9D,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,cAAc,CAAC,WAAW,CAAC;IAYhE,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAQlC,kBAAkB,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAIxE"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 🐟 AZERCLAW Ollama Provider (Local Models)
|
|
4
|
-
*/
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.OllamaProvider = void 0;
|
|
10
|
-
const openai_1 = __importDefault(require("openai"));
|
|
11
|
-
const base_1 = require("./base");
|
|
12
|
-
class OllamaProvider extends base_1.BaseProvider {
|
|
13
|
-
name = 'ollama';
|
|
14
|
-
displayName = 'Ollama (Local)';
|
|
15
|
-
client;
|
|
16
|
-
baseUrl;
|
|
17
|
-
defaultModel;
|
|
18
|
-
constructor(config) {
|
|
19
|
-
super();
|
|
20
|
-
this.baseUrl = config.baseUrl || 'http://localhost:11434';
|
|
21
|
-
this.defaultModel = config.defaultModel || 'llama3.1';
|
|
22
|
-
this.client = new openai_1.default({ apiKey: 'ollama', baseURL: `${this.baseUrl}/v1` });
|
|
23
|
-
}
|
|
24
|
-
async isAvailable() {
|
|
25
|
-
try {
|
|
26
|
-
const res = await fetch(`${this.baseUrl}/api/tags`);
|
|
27
|
-
return res.ok;
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async complete(options) {
|
|
34
|
-
const model = options.model || this.defaultModel;
|
|
35
|
-
try {
|
|
36
|
-
const msgs = options.systemPrompt ? [{ role: 'system', content: options.systemPrompt }, ...options.messages] : options.messages;
|
|
37
|
-
const response = await this.client.chat.completions.create({ model, messages: msgs, max_tokens: options.maxTokens || 4096, temperature: options.temperature ?? 0.7 });
|
|
38
|
-
return { content: response.choices[0].message?.content || '', model, provider: this.name, finishReason: 'stop' };
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return { content: '', model, provider: this.name, finishReason: 'error' };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async *stream(options) {
|
|
45
|
-
const model = options.model || this.defaultModel;
|
|
46
|
-
try {
|
|
47
|
-
const msgs = options.systemPrompt ? [{ role: 'system', content: options.systemPrompt }, ...options.messages] : options.messages;
|
|
48
|
-
const stream = await this.client.chat.completions.create({ model, messages: msgs, max_tokens: options.maxTokens || 4096, stream: true });
|
|
49
|
-
for await (const chunk of stream) {
|
|
50
|
-
if (chunk.choices[0]?.delta?.content)
|
|
51
|
-
yield { type: 'text', content: chunk.choices[0].delta.content };
|
|
52
|
-
if (chunk.choices[0]?.finish_reason)
|
|
53
|
-
yield { type: 'done' };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch (e) {
|
|
57
|
-
yield { type: 'error', error: e.message || 'Ollama connection failed' };
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async listModels() {
|
|
61
|
-
try {
|
|
62
|
-
const res = await fetch(`${this.baseUrl}/api/tags`);
|
|
63
|
-
const data = await res.json();
|
|
64
|
-
return (data.models || []).map((m) => ({ id: m.name, name: m.name, provider: this.name, contextWindow: 8192, supportsTools: false, supportsStreaming: true }));
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
async validateConnection() {
|
|
71
|
-
try {
|
|
72
|
-
const res = await fetch(`${this.baseUrl}/api/tags`);
|
|
73
|
-
return res.ok ? { valid: true } : { valid: false, error: `HTTP ${res.status}` };
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
return { valid: false, error: 'Cannot connect to Ollama' };
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.OllamaProvider = OllamaProvider;
|
|
81
|
-
//# sourceMappingURL=ollama.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.js","sourceRoot":"","sources":["../../../src/providers/ollama.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;AAEH,oDAA4B;AAC5B,iCAAmG;AAEnG,MAAa,cAAe,SAAQ,mBAAY;IACrC,IAAI,GAAG,QAAQ,CAAC;IAChB,WAAW,GAAG,gBAAgB,CAAC;IAChC,MAAM,CAAS;IACf,OAAO,CAAS;IAChB,YAAY,CAAS;IAE7B,YAAY,MAAmD;QAC7D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,wBAAwB,CAAC;QAC1D,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,UAAU,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YAAC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;YAAC,OAAO,GAAG,CAAC,EAAE,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,OAAO,KAAK,CAAC;QAAC,CAAC;IACrG,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAA0B;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC;QACjD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAiB,EAAE,OAAO,EAAE,OAAO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AG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;YAAC,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;QAAC,CAAC;QAC7I,MAAM,CAAC;YAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC;QAAC,CAAC;IACvE,CAAC;CACF;AAnDD,wCAmDC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🐟 AZERCLAW OpenRouter Provider
|
|
3
|
-
* Specialized provider for OpenRouter with free-model filtering.
|
|
4
|
-
*/
|
|
5
|
-
import { OpenAIProvider } from './openai';
|
|
6
|
-
import { ModelInfo } from './base';
|
|
7
|
-
export declare class OpenRouterProvider extends OpenAIProvider {
|
|
8
|
-
readonly name = "openrouter";
|
|
9
|
-
readonly displayName = "OpenRouter";
|
|
10
|
-
constructor(config: {
|
|
11
|
-
apiKey: string;
|
|
12
|
-
baseUrl?: string;
|
|
13
|
-
defaultModel?: string;
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* List all models, but filter for FREE models and include availability status.
|
|
17
|
-
*/
|
|
18
|
-
listModels(): Promise<ModelInfo[]>;
|
|
19
|
-
private getFreeDefaultModels;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=openrouter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter.d.ts","sourceRoot":"","sources":["../../../src/providers/openrouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,SAAkB,IAAI,gBAAgB;IACtC,SAAkB,WAAW,gBAAgB;gBAEjC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAQ/E;;OAEG;IACY,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAoCjD,OAAO,CAAC,oBAAoB;CAO7B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 🐟 AZERCLAW OpenRouter Provider
|
|
4
|
-
* Specialized provider for OpenRouter with free-model filtering.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.OpenRouterProvider = void 0;
|
|
8
|
-
const openai_1 = require("./openai");
|
|
9
|
-
class OpenRouterProvider extends openai_1.OpenAIProvider {
|
|
10
|
-
name = 'openrouter';
|
|
11
|
-
displayName = 'OpenRouter';
|
|
12
|
-
constructor(config) {
|
|
13
|
-
super({
|
|
14
|
-
apiKey: config.apiKey,
|
|
15
|
-
baseUrl: config.baseUrl || 'https://openrouter.ai/api/v1',
|
|
16
|
-
defaultModel: config.defaultModel || 'google/gemini-flash-1.5-exp:free',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* List all models, but filter for FREE models and include availability status.
|
|
21
|
-
*/
|
|
22
|
-
async listModels() {
|
|
23
|
-
try {
|
|
24
|
-
const response = await fetch(`${this.baseUrl}/models`, {
|
|
25
|
-
headers: {
|
|
26
|
-
'Authorization': `Bearer ${this.apiKey}`,
|
|
27
|
-
'HTTP-Referer': 'https://azerclaw.ai',
|
|
28
|
-
'X-Title': 'AZERCLAW',
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
if (!response.ok)
|
|
32
|
-
throw new Error('Failed to fetch OpenRouter models');
|
|
33
|
-
const data = await response.json();
|
|
34
|
-
return data.data
|
|
35
|
-
.filter((m) => {
|
|
36
|
-
// Filter for free models
|
|
37
|
-
const isFree = parseFloat(m.pricing.prompt) === 0 && parseFloat(m.pricing.completion) === 0;
|
|
38
|
-
return isFree;
|
|
39
|
-
})
|
|
40
|
-
.map((m) => ({
|
|
41
|
-
id: m.id,
|
|
42
|
-
name: m.name || m.id,
|
|
43
|
-
provider: this.name,
|
|
44
|
-
contextWindow: m.context_length,
|
|
45
|
-
supportsTools: true, // Most modern free models on OpenRouter support tools
|
|
46
|
-
supportsStreaming: true,
|
|
47
|
-
description: `FREE · ${m.description || ''}`,
|
|
48
|
-
status: 'online', // OpenRouter models in the list are generally online
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
console.error('OpenRouter listModels error:', error);
|
|
53
|
-
return this.getFreeDefaultModels();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
getFreeDefaultModels() {
|
|
57
|
-
return [
|
|
58
|
-
{ id: 'google/gemini-flash-1.5-exp:free', name: 'Gemini 1.5 Flash (Free)', provider: this.name, contextWindow: 1048576, supportsTools: true, supportsStreaming: true },
|
|
59
|
-
{ id: 'huggingfaceh4/zephyr-7b-beta:free', name: 'Zephyr 7B Beta (Free)', provider: this.name, contextWindow: 4096, supportsTools: true, supportsStreaming: true },
|
|
60
|
-
{ id: 'mistralai/mistral-7b-instruct:free', name: 'Mistral 7B Instruct (Free)', provider: this.name, contextWindow: 4096, supportsTools: true, supportsStreaming: true },
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.OpenRouterProvider = OpenRouterProvider;
|
|
65
|
-
//# sourceMappingURL=openrouter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter.js","sourceRoot":"","sources":["../../../src/providers/openrouter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qCAA0C;AAG1C,MAAa,kBAAm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C/B,aAAa,EAAE,IAAI,EAAE,sDAAsD;gBAC3E,iBAAiB,EAAE,IAAI;gBACvB,WAAW,EAAE,UAAU,CAAC,CAAC,WAAW,IAAI,EAAE,EAAE;gBAC5C,MAAM,EAAE,QAAQ,EAAE,qDAAqD;aACxE,CAAC,CAAC,CAAC;QACR,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;IAEO,oBAAoB;QAC1B,OAAO;YACL,EAAE,EAAE,EAAE,kCAAkC,EAAE,IAAI,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;YACtK,EAAE,EAAE,EAAE,mCAAmC,EAAE,IAAI,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;YAClK,EAAE,EAAE,EAAE,oCAAoC,EAAE,IAAI,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;SACzK,CAAC;IACJ,CAAC;CACF;AA1DD,gDA0DC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🐟 AZERCLAW Vought Gate Provider
|
|
3
|
-
* Specialized provider for the secure Cloudflare proxy.
|
|
4
|
-
*/
|
|
5
|
-
import { OpenAIProvider } from './openai';
|
|
6
|
-
import { ModelInfo } from './base';
|
|
7
|
-
export declare class VoughtGateProvider extends OpenAIProvider {
|
|
8
|
-
readonly name = "custom";
|
|
9
|
-
readonly displayName = "Vought Gate";
|
|
10
|
-
constructor(config: {
|
|
11
|
-
apiKey: string;
|
|
12
|
-
baseUrl?: string;
|
|
13
|
-
defaultModel?: string;
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* Return the whitelisted free models available via the Vought Gate.
|
|
17
|
-
*/
|
|
18
|
-
listModels(): Promise<ModelInfo[]>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=vought.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vought.d.ts","sourceRoot":"","sources":["../../../src/providers/vought.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,SAAkB,IAAI,YAAY;IAClC,SAAkB,WAAW,iBAAiB;gBAElC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAQ/E;;OAEG;IACY,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;CAWlD"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* 🐟 AZERCLAW Vought Gate Provider
|
|
4
|
-
* Specialized provider for the secure Cloudflare proxy.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.VoughtGateProvider = void 0;
|
|
8
|
-
const openai_1 = require("./openai");
|
|
9
|
-
class VoughtGateProvider extends openai_1.OpenAIProvider {
|
|
10
|
-
name = 'custom';
|
|
11
|
-
displayName = 'Vought Gate';
|
|
12
|
-
constructor(config) {
|
|
13
|
-
super({
|
|
14
|
-
apiKey: config.apiKey,
|
|
15
|
-
baseUrl: config.baseUrl || 'https://vought-gate.achu-ashwin98.workers.dev',
|
|
16
|
-
defaultModel: config.defaultModel || '@cf/moonshotai/kimi-k2.6',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Return the whitelisted free models available via the Vought Gate.
|
|
21
|
-
*/
|
|
22
|
-
async listModels() {
|
|
23
|
-
return [
|
|
24
|
-
{ id: '@cf/moonshotai/kimi-k2.6', name: 'Kimi K2.6 (Azertron X1.0)', provider: this.name, contextWindow: 128000, supportsTools: true, supportsStreaming: true, description: 'FREE · Elite coding and reasoning' },
|
|
25
|
-
{ id: '@cf/meta/llama-3.1-8b-instruct', name: 'Llama 3.1 8B', provider: this.name, contextWindow: 8192, supportsTools: true, supportsStreaming: true, description: 'FREE · Fast and reliable' },
|
|
26
|
-
{ id: '@cf/meta/llama-3.1-70b-instruct', name: 'Llama 3.1 70B', provider: this.name, contextWindow: 8192, supportsTools: true, supportsStreaming: true, description: 'FREE · High performance general purpose' },
|
|
27
|
-
{ id: '@cf/mistralai/mistral-7b-instruct-v0.3', name: 'Mistral 7B v0.3', provider: this.name, contextWindow: 32768, supportsTools: true, supportsStreaming: true, description: 'FREE · Efficient instruction following' },
|
|
28
|
-
{ id: '@cf/google/gemma-7b-it', name: 'Gemma 7B', provider: this.name, contextWindow: 8192, supportsTools: true, supportsStreaming: true, description: 'FREE · Google’s lightweight model' },
|
|
29
|
-
{ id: '@cf/qwen/qwen1.5-7b-chat', name: 'Qwen 1.5 7B', provider: this.name, contextWindow: 32768, supportsTools: true, supportsStreaming: true, description: 'FREE · Strong chat performance' },
|
|
30
|
-
{ id: '@cf/microsoft/phi-2', name: 'Phi-2', provider: this.name, contextWindow: 2048, supportsTools: false, supportsStreaming: true, description: 'FREE · Ultra-compact and fast' },
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.VoughtGateProvider = VoughtGateProvider;
|
|
35
|
-
//# sourceMappingURL=vought.js.map
|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