@hebo-ai/gateway 0.9.0 → 0.9.1
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/endpoints/conversations/storage/dialects/greptime.js +16 -4
- package/dist/endpoints/shared/converters.d.ts +1 -0
- package/dist/endpoints/shared/converters.js +1 -1
- package/dist/models/anthropic/presets.js +6 -1
- package/dist/models/google/middleware.js +9 -3
- package/dist/models/meta/presets.js +12 -2
- package/dist/utils/env.js +1 -1
- package/package.json +4 -4
|
@@ -29,10 +29,22 @@ export const GrepTimeDialectConfig = Object.assign({}, PostgresDialectConfig, Gr
|
|
|
29
29
|
partitionClause: (cols) => {
|
|
30
30
|
const col = cols[0];
|
|
31
31
|
return (`PARTITION ON COLUMNS (${col}) (` +
|
|
32
|
-
`${col} < '
|
|
33
|
-
`${col} >= '
|
|
34
|
-
`${col} >= '
|
|
35
|
-
`${col} >= '
|
|
32
|
+
`${col} < '1', ` +
|
|
33
|
+
`${col} >= 'f', ` +
|
|
34
|
+
`${col} >= '1' AND ${col} < '2', ` +
|
|
35
|
+
`${col} >= '2' AND ${col} < '3', ` +
|
|
36
|
+
`${col} >= '3' AND ${col} < '4', ` +
|
|
37
|
+
`${col} >= '4' AND ${col} < '5', ` +
|
|
38
|
+
`${col} >= '5' AND ${col} < '6', ` +
|
|
39
|
+
`${col} >= '6' AND ${col} < '7', ` +
|
|
40
|
+
`${col} >= '7' AND ${col} < '8', ` +
|
|
41
|
+
`${col} >= '8' AND ${col} < '9', ` +
|
|
42
|
+
`${col} >= '9' AND ${col} < 'a', ` +
|
|
43
|
+
`${col} >= 'a' AND ${col} < 'b', ` +
|
|
44
|
+
`${col} >= 'b' AND ${col} < 'c', ` +
|
|
45
|
+
`${col} >= 'c' AND ${col} < 'd', ` +
|
|
46
|
+
`${col} >= 'd' AND ${col} < 'e', ` +
|
|
47
|
+
`${col} >= 'e' AND ${col} < 'f')`);
|
|
36
48
|
},
|
|
37
49
|
types: GrepTimeBase.types,
|
|
38
50
|
});
|
|
@@ -44,7 +44,7 @@ export function parseReasoningOptions(reasoning_effort, reasoning) {
|
|
|
44
44
|
const effort = reasoning?.effort ?? reasoning_effort;
|
|
45
45
|
const max_tokens = reasoning?.max_tokens;
|
|
46
46
|
if (reasoning?.enabled === false || effort === "none") {
|
|
47
|
-
return { reasoning: { enabled: false }, reasoning_effort: "none" };
|
|
47
|
+
return { reasoning: { enabled: false, effort: "none" }, reasoning_effort: "none" };
|
|
48
48
|
}
|
|
49
49
|
if (!reasoning && effort === undefined)
|
|
50
50
|
return {};
|
|
@@ -6,7 +6,12 @@ const CLAUDE_BASE = {
|
|
|
6
6
|
},
|
|
7
7
|
capabilities: ["attachments", "tool_call", "structured_output", "temperature"],
|
|
8
8
|
context: 200000,
|
|
9
|
-
providers: [
|
|
9
|
+
providers: [
|
|
10
|
+
"anthropic",
|
|
11
|
+
"bedrock",
|
|
12
|
+
"vertex",
|
|
13
|
+
"azure",
|
|
14
|
+
],
|
|
10
15
|
};
|
|
11
16
|
const CLAUDE_PDF_MODALITIES = {
|
|
12
17
|
modalities: {
|
|
@@ -71,9 +71,15 @@ export const geminiReasoningMiddleware = {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
else if (modelId.includes("gemini-3") && reasoning.effort) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
if (reasoning.effort === "none") {
|
|
75
|
+
// thinkingBudget: 0 fully disables thinking (thinkingLevel: "minimal" still allows some)
|
|
76
|
+
target.thinkingConfig = { thinkingBudget: 0 };
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
target.thinkingConfig = {
|
|
80
|
+
thinkingLevel: mapGeminiReasoningEffort(reasoning.effort, modelId),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
77
83
|
// FUTURE: warn if model is gemini-3 and max_tokens (unsupported) was ignored
|
|
78
84
|
}
|
|
79
85
|
const thinkingConfig = (target.thinkingConfig ??= {});
|
|
@@ -6,7 +6,12 @@ const LLAMA_3_BASE = {
|
|
|
6
6
|
},
|
|
7
7
|
capabilities: ["attachments", "tool_call", "temperature"],
|
|
8
8
|
context: 128000,
|
|
9
|
-
providers: [
|
|
9
|
+
providers: [
|
|
10
|
+
"groq",
|
|
11
|
+
"bedrock",
|
|
12
|
+
"vertex",
|
|
13
|
+
"azure",
|
|
14
|
+
],
|
|
10
15
|
};
|
|
11
16
|
export const llama31_8b = presetFor()("meta/llama-3.1-8b", {
|
|
12
17
|
...LLAMA_3_BASE,
|
|
@@ -63,7 +68,12 @@ const LLAMA_4_BASE = {
|
|
|
63
68
|
},
|
|
64
69
|
capabilities: ["attachments", "tool_call", "temperature"],
|
|
65
70
|
context: 1000000,
|
|
66
|
-
providers: [
|
|
71
|
+
providers: [
|
|
72
|
+
"groq",
|
|
73
|
+
"bedrock",
|
|
74
|
+
"vertex",
|
|
75
|
+
"azure",
|
|
76
|
+
],
|
|
67
77
|
};
|
|
68
78
|
export const llama4Scout = presetFor()("meta/llama-4-scout", {
|
|
69
79
|
...LLAMA_4_BASE,
|
package/dist/utils/env.js
CHANGED
|
@@ -2,6 +2,6 @@ const NODE_ENV = typeof process === "undefined"
|
|
|
2
2
|
? // oxlint-disable-next-line no-unsafe-member-access
|
|
3
3
|
(globalThis.NODE_ENV ?? globalThis.ENV?.NODE_ENV)
|
|
4
4
|
: // oxlint-disable-next-line no-unsafe-assignment
|
|
5
|
-
process.env?.NODE_ENV;
|
|
5
|
+
process.env?.["NODE_ENV"];
|
|
6
6
|
export const isProduction = () => NODE_ENV === "production";
|
|
7
7
|
export const isTest = () => NODE_ENV === "test";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebo-ai/gateway",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "AI gateway as a framework. For full control over models, routing & lifecycle. OpenAI-compatible /chat/completions, /embeddings & /models.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"typecheck": "oxlint --type-check",
|
|
161
161
|
"test": "bun test",
|
|
162
162
|
"check": "bun lint && bun typecheck",
|
|
163
|
-
"fix": "bun lint:staged && bun
|
|
163
|
+
"fix": "bun lint:staged && bun format:staged"
|
|
164
164
|
},
|
|
165
165
|
"dependencies": {
|
|
166
166
|
"@ai-sdk/provider": "^3.0.8",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"pg": "^8.19.0",
|
|
204
204
|
"pino": "^10.3.1",
|
|
205
205
|
"postgres": "^3.4.8",
|
|
206
|
-
"typescript": "^
|
|
206
|
+
"typescript": "^6.0.2",
|
|
207
207
|
"vite": "^7.3.1",
|
|
208
208
|
"vite-tsconfig-paths": "^6.1.1",
|
|
209
209
|
"voyage-ai-provider": "^3.0.0"
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"mysql2": "^3.11.0",
|
|
223
223
|
"pg": "^8.13.0",
|
|
224
224
|
"postgres": "^3.4.0",
|
|
225
|
-
"typescript": "
|
|
225
|
+
"typescript": ">=5.9.3",
|
|
226
226
|
"voyage-ai-provider": "^3.0.0"
|
|
227
227
|
},
|
|
228
228
|
"peerDependenciesMeta": {
|