@wingman-ai/gateway 0.4.3 → 0.5.0
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/dist/agent/config/modelFactory.cjs +9 -7
- package/dist/agent/config/modelFactory.js +9 -7
- package/dist/agent/tests/modelFactory.test.cjs +4 -2
- package/dist/agent/tests/modelFactory.test.js +4 -2
- package/dist/providers/registry.cjs +1 -1
- package/dist/providers/registry.js +1 -1
- package/dist/webui/assets/index-_GQBoNDx.js +215 -0
- package/dist/webui/assets/{index-Cyg_Hs57.css → index-tPN3uQMb.css} +1 -1
- package/dist/webui/index.html +2 -2
- package/package.json +12 -11
- package/templates/agents/game-dev/agent.md +0 -12
- package/dist/webui/assets/index-DZXLLjaA.js +0 -280
|
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
ModelFactory: ()=>ModelFactory
|
|
28
28
|
});
|
|
29
29
|
const anthropic_namespaceObject = require("@langchain/anthropic");
|
|
30
|
+
const ollama_namespaceObject = require("@langchain/ollama");
|
|
30
31
|
const openai_namespaceObject = require("@langchain/openai");
|
|
31
32
|
const xai_namespaceObject = require("@langchain/xai");
|
|
32
33
|
const codex_cjs_namespaceObject = require("../../providers/codex.cjs");
|
|
@@ -208,17 +209,18 @@ class ModelFactory {
|
|
|
208
209
|
static createOllamaModel(model, options) {
|
|
209
210
|
const tokenResult = (0, credentials_cjs_namespaceObject.resolveProviderToken)("ollama");
|
|
210
211
|
const provider = (0, registry_cjs_namespaceObject.getProviderSpec)("ollama");
|
|
211
|
-
const apiKey = tokenResult.token ?? "ollama";
|
|
212
212
|
const params = {
|
|
213
213
|
model,
|
|
214
214
|
temperature: 1,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
baseUrl: provider?.baseURL,
|
|
216
|
+
...tokenResult.token ? {
|
|
217
|
+
headers: {
|
|
218
|
+
Authorization: `Bearer ${tokenResult.token}`
|
|
219
|
+
}
|
|
220
|
+
} : {}
|
|
219
221
|
};
|
|
220
|
-
ModelFactory.
|
|
221
|
-
return new
|
|
222
|
+
if (options.reasoningEffort) ModelFactory.warnUnsupportedReasoningEffort("ollama", model, options.reasoningEffort, options.ownerLabel);
|
|
223
|
+
return new ollama_namespaceObject.ChatOllama(params);
|
|
222
224
|
}
|
|
223
225
|
static applyOpenAIReasoningEffort(params, provider, model, options) {
|
|
224
226
|
const effort = options.reasoningEffort;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChatAnthropic } from "@langchain/anthropic";
|
|
2
|
+
import { ChatOllama } from "@langchain/ollama";
|
|
2
3
|
import { ChatOpenAI } from "@langchain/openai";
|
|
3
4
|
import { ChatXAI } from "@langchain/xai";
|
|
4
5
|
import { createCodexFetch, resolveCodexAuthFromFile } from "../../providers/codex.js";
|
|
@@ -180,17 +181,18 @@ class ModelFactory {
|
|
|
180
181
|
static createOllamaModel(model, options) {
|
|
181
182
|
const tokenResult = resolveProviderToken("ollama");
|
|
182
183
|
const provider = getProviderSpec("ollama");
|
|
183
|
-
const apiKey = tokenResult.token ?? "ollama";
|
|
184
184
|
const params = {
|
|
185
185
|
model,
|
|
186
186
|
temperature: 1,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
baseUrl: provider?.baseURL,
|
|
188
|
+
...tokenResult.token ? {
|
|
189
|
+
headers: {
|
|
190
|
+
Authorization: `Bearer ${tokenResult.token}`
|
|
191
|
+
}
|
|
192
|
+
} : {}
|
|
191
193
|
};
|
|
192
|
-
ModelFactory.
|
|
193
|
-
return new
|
|
194
|
+
if (options.reasoningEffort) ModelFactory.warnUnsupportedReasoningEffort("ollama", model, options.reasoningEffort, options.ownerLabel);
|
|
195
|
+
return new ChatOllama(params);
|
|
194
196
|
}
|
|
195
197
|
static applyOpenAIReasoningEffort(params, provider, model, options) {
|
|
196
198
|
const effort = options.reasoningEffort;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_exports__ = {};
|
|
3
3
|
const anthropic_namespaceObject = require("@langchain/anthropic");
|
|
4
|
+
const ollama_namespaceObject = require("@langchain/ollama");
|
|
4
5
|
const openai_namespaceObject = require("@langchain/openai");
|
|
5
6
|
const xai_namespaceObject = require("@langchain/xai");
|
|
6
7
|
const external_vitest_namespaceObject = require("vitest");
|
|
@@ -86,11 +87,12 @@ const originalXaiApiKey = process.env.XAI_API_KEY;
|
|
|
86
87
|
});
|
|
87
88
|
(0, external_vitest_namespaceObject.it)("should create an Ollama model", ()=>{
|
|
88
89
|
const model = modelFactory_cjs_namespaceObject.ModelFactory.createModel("ollama:llama3.2");
|
|
89
|
-
(0, external_vitest_namespaceObject.expect)(model).toBeInstanceOf(
|
|
90
|
+
(0, external_vitest_namespaceObject.expect)(model).toBeInstanceOf(ollama_namespaceObject.ChatOllama);
|
|
91
|
+
(0, external_vitest_namespaceObject.expect)(model.baseUrl).toBe("http://localhost:11434");
|
|
90
92
|
});
|
|
91
93
|
(0, external_vitest_namespaceObject.it)("should allow model names with additional colons", ()=>{
|
|
92
94
|
const model = modelFactory_cjs_namespaceObject.ModelFactory.createModel("ollama:phi4:14b-q8_0");
|
|
93
|
-
(0, external_vitest_namespaceObject.expect)(model).toBeInstanceOf(
|
|
95
|
+
(0, external_vitest_namespaceObject.expect)(model).toBeInstanceOf(ollama_namespaceObject.ChatOllama);
|
|
94
96
|
});
|
|
95
97
|
(0, external_vitest_namespaceObject.it)("should create native xAI image model for grok-imagine-image", ()=>{
|
|
96
98
|
const model = modelFactory_cjs_namespaceObject.ModelFactory.createModel("xai:grok-imagine-image");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChatAnthropic } from "@langchain/anthropic";
|
|
2
|
+
import { ChatOllama } from "@langchain/ollama";
|
|
2
3
|
import { ChatOpenAI } from "@langchain/openai";
|
|
3
4
|
import { ChatXAI } from "@langchain/xai";
|
|
4
5
|
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
@@ -84,11 +85,12 @@ describe("ModelFactory", ()=>{
|
|
|
84
85
|
});
|
|
85
86
|
it("should create an Ollama model", ()=>{
|
|
86
87
|
const model = ModelFactory.createModel("ollama:llama3.2");
|
|
87
|
-
expect(model).toBeInstanceOf(
|
|
88
|
+
expect(model).toBeInstanceOf(ChatOllama);
|
|
89
|
+
expect(model.baseUrl).toBe("http://localhost:11434");
|
|
88
90
|
});
|
|
89
91
|
it("should allow model names with additional colons", ()=>{
|
|
90
92
|
const model = ModelFactory.createModel("ollama:phi4:14b-q8_0");
|
|
91
|
-
expect(model).toBeInstanceOf(
|
|
93
|
+
expect(model).toBeInstanceOf(ChatOllama);
|
|
92
94
|
});
|
|
93
95
|
it("should create native xAI image model for grok-imagine-image", ()=>{
|
|
94
96
|
const model = ModelFactory.createModel("xai:grok-imagine-image");
|