@mizchi/vlmkit-ai 0.8.1 → 0.9.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/README.md +1 -1
- package/dist/llm-client.mjs +3 -2
- package/dist/reasoning-pipeline.mjs +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/llm-client.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VrtConfigError } from "./errors.mjs";
|
|
2
|
+
import { readEnv } from "@mizchi/vlmkit-core/legacy-names.ts";
|
|
2
3
|
//#region src/llm-client.ts
|
|
3
4
|
function createAnthropicClient(apiKey, model) {
|
|
4
5
|
const modelId = model ?? "claude-sonnet-4-6";
|
|
@@ -225,14 +226,14 @@ const VALID_PROVIDERS = new Set([
|
|
|
225
226
|
* factory decides whether to throw based on `throwIfMissing`.
|
|
226
227
|
*/
|
|
227
228
|
function resolveProviderConfig(options) {
|
|
228
|
-
const rawProvider = options?.provider ??
|
|
229
|
+
const rawProvider = options?.provider ?? readEnv("LLM_PROVIDER") ?? "gemini";
|
|
229
230
|
if (!VALID_PROVIDERS.has(rawProvider)) return {
|
|
230
231
|
ok: false,
|
|
231
232
|
code: "INVALID_PROVIDER",
|
|
232
233
|
message: `Unknown VRT_LLM_PROVIDER "${rawProvider}". Expected: gemini | anthropic | openrouter.`
|
|
233
234
|
};
|
|
234
235
|
const provider = rawProvider;
|
|
235
|
-
const model = options?.model ??
|
|
236
|
+
const model = options?.model ?? readEnv("LLM_MODEL") ?? void 0;
|
|
236
237
|
const keyMap = {
|
|
237
238
|
gemini: process.env.GEMINI_API_KEY ?? process.env.GOOGLE_AI_API_KEY,
|
|
238
239
|
anthropic: process.env.ANTHROPIC_API_KEY,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { VrtConfigError } from "./errors.mjs";
|
|
2
2
|
import { createUnifiedLLMClient } from "./llm-client.mjs";
|
|
3
3
|
import { createVlmClient, resolveModel } from "./vlm-client.mjs";
|
|
4
|
+
import { readEnv } from "@mizchi/vlmkit-core/legacy-names.ts";
|
|
4
5
|
import { resizeBase64Png } from "@mizchi/vlmkit-core/image-resize.ts";
|
|
5
6
|
//#region src/reasoning-pipeline.ts
|
|
6
7
|
/**
|
|
@@ -133,7 +134,7 @@ function parseStage2Response(raw) {
|
|
|
133
134
|
function createReasoningPipeline(config) {
|
|
134
135
|
const throwIfMissing = config?.throwIfMissing ?? true;
|
|
135
136
|
let vlmClient = null;
|
|
136
|
-
let vlmModelId = config?.vlmModel ??
|
|
137
|
+
let vlmModelId = config?.vlmModel ?? readEnv("VLM_MODEL") ?? "bytedance/ui-tars-1.5-7b";
|
|
137
138
|
let llmClient = createUnifiedLLMClient({
|
|
138
139
|
provider: config?.llmProvider,
|
|
139
140
|
model: config?.llmModel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mizchi/vlmkit-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "VLM / LLM clients, reasoning pipeline, and NLP helpers used by VRT to interpret diff images and natural-language intent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "mizchi",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@google/generative-ai": "^0.24.1",
|
|
40
|
-
"@mizchi/vlmkit-core": "0.
|
|
40
|
+
"@mizchi/vlmkit-core": "0.9.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm --dir ../.. exec tsdown --config tsdown.packages.config.ts --filter @mizchi/vlmkit-ai",
|