@x12i/ai-gateway 10.0.1 → 10.0.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/dist/gateway-utils.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as crypto from 'crypto';
|
|
6
6
|
import { FallbackExhaustedError } from '@x12i/ai-providers-router';
|
|
7
|
-
import { ModelResolutionError,
|
|
7
|
+
import { ModelResolutionError, isKnownProfileChoice } from '@x12i/ai-tools';
|
|
8
8
|
import { extractHttpStatusCode } from './gateway-retry.js';
|
|
9
9
|
import { gatewayLogDebug, withActivityIdentity } from './gateway-log-meta.js';
|
|
10
10
|
import { MaxTokensRequiredError, ModelRequiredError } from './instruction-errors.js';
|
|
@@ -699,7 +699,7 @@ export class ModelProfileUnroutableError extends Error {
|
|
|
699
699
|
}
|
|
700
700
|
function buildModelResolutionFailureError(explicitModel, provider, resolution) {
|
|
701
701
|
const base = new ModelResolutionError({ provider, model: explicitModel }, resolution);
|
|
702
|
-
if (
|
|
702
|
+
if (isKnownProfileChoice(explicitModel)) {
|
|
703
703
|
return new ModelProfileUnroutableError(explicitModel, provider, base);
|
|
704
704
|
}
|
|
705
705
|
return base;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as crypto from 'crypto';
|
|
6
6
|
import { FallbackExhaustedError } from '@x12i/ai-providers-router';
|
|
7
|
-
import { ModelResolutionError,
|
|
7
|
+
import { ModelResolutionError, isKnownProfileChoice } from '@x12i/ai-tools';
|
|
8
8
|
import { extractHttpStatusCode } from './gateway-retry.js';
|
|
9
9
|
import { gatewayLogDebug, withActivityIdentity } from './gateway-log-meta.js';
|
|
10
10
|
import { MaxTokensRequiredError, ModelRequiredError } from './instruction-errors.js';
|
|
@@ -699,7 +699,7 @@ export class ModelProfileUnroutableError extends Error {
|
|
|
699
699
|
}
|
|
700
700
|
function buildModelResolutionFailureError(explicitModel, provider, resolution) {
|
|
701
701
|
const base = new ModelResolutionError({ provider, model: explicitModel }, resolution);
|
|
702
|
-
if (
|
|
702
|
+
if (isKnownProfileChoice(explicitModel)) {
|
|
703
703
|
return new ModelProfileUnroutableError(explicitModel, provider, base);
|
|
704
704
|
}
|
|
705
705
|
return base;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x12i/ai-gateway",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "AI Gateway - Unified interface for LLM provider routing and management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@x12i/activix": "^8.5.0",
|
|
45
45
|
"@x12i/ai-providers-router": "^4.9.2",
|
|
46
|
-
"@x12i/ai-tools": "^2.
|
|
46
|
+
"@x12i/ai-tools": "^2.4.0",
|
|
47
47
|
"@x12i/flex-md": "^4.8.0",
|
|
48
48
|
"@x12i/logxer": "^4.6.0",
|
|
49
49
|
"@x12i/rendrix": "^4.3.0"
|