@homeflare/distilled-litellm 0.4.0 → 0.4.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/protocol.d.ts +2 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +3 -1
- package/dist/protocol.js.map +1 -1
- package/package.json +3 -3
- package/src/protocol.ts +8 -3
package/dist/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Layer from "effect/Layer";
|
|
2
|
-
import type * as HttpClient from "effect/
|
|
3
|
-
import type * as HttpClientError from "effect/
|
|
2
|
+
import type * as HttpClient from "effect/http/HttpClient";
|
|
3
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
4
4
|
import type * as API from "@distilled.cloud/core/api";
|
|
5
5
|
import type { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
import { Credentials } from "./credentials.ts";
|
package/dist/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAGL,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,WAAW,GACX,eAAe,CAAC,eAAe,CAAC;AAEpC,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAoEnE,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CA4BlD,CAAC"}
|
package/dist/protocol.js
CHANGED
|
@@ -41,7 +41,7 @@ import * as Effect from "effect/Effect";
|
|
|
41
41
|
import * as Redacted from "effect/Redacted";
|
|
42
42
|
import { makeRestProtocol, } from "@distilled.cloud/core/protocol-rest";
|
|
43
43
|
import { Credentials } from "./credentials.js";
|
|
44
|
-
import { UnknownLitellmError } from "./errors.js";
|
|
44
|
+
import { LitellmParseError, UnknownLitellmError } from "./errors.js";
|
|
45
45
|
/**
|
|
46
46
|
* Extract `{ message, code }` from a failed response body. Two real shapes,
|
|
47
47
|
* both observed in the pinned source (see this file's header):
|
|
@@ -122,6 +122,8 @@ export const LitellmProtocol = makeRestProtocol({
|
|
|
122
122
|
Accept: "application/json",
|
|
123
123
|
}),
|
|
124
124
|
errorEnvelope,
|
|
125
|
+
// A 2xx body that fails strict output validation (core rc.13).
|
|
126
|
+
parseError: ({ body, cause }) => new LitellmParseError({ body, cause }),
|
|
125
127
|
unknownError: ({ code, message, body }) => new UnknownLitellmError({
|
|
126
128
|
code: typeof code === "string"
|
|
127
129
|
? code
|
package/dist/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAK5C,OAAO,EACL,gBAAgB,GAEjB,MAAM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EAAE,UAAU,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;QACvD,MAAM,EAAE,kBAAkB;KAC3B,CAAC;IACF,aAAa;IACb,+DAA+D;IAC/D,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,iBAAiB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CACxC,IAAI,mBAAmB,CAAC;QACtB,IAAI,EACF,OAAO,IAAI,KAAK,QAAQ;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI,KAAK,SAAS;gBAClB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;gBACd,CAAC,CAAC,SAAS;QACjB,OAAO;QACP,IAAI;KACL,CAAC;CACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homeflare/distilled-litellm",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Interim npm home for @distilled.cloud/litellm — see docs/distilled-interim.md. Not published upstream yet; the kit aliases @distilled.cloud/litellm onto this package until it is.",
|
|
5
5
|
"homepage": "https://github.com/taslabs-net/homeflare-kit/tree/main/packages/distilled-litellm#readme",
|
|
6
6
|
"bugs": "https://github.com/taslabs-net/homeflare-kit/issues",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@distilled.cloud/core": "1.0.0-rc.
|
|
70
|
+
"@distilled.cloud/core": "1.0.0-rc.13"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"effect": "4.0.
|
|
73
|
+
"effect": "4.0.1"
|
|
74
74
|
}
|
|
75
75
|
}
|
package/src/protocol.ts
CHANGED
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
import * as Effect from "effect/Effect";
|
|
41
41
|
import type * as Layer from "effect/Layer";
|
|
42
42
|
import * as Redacted from "effect/Redacted";
|
|
43
|
-
import type * as HttpClient from "effect/
|
|
44
|
-
import type * as HttpClientError from "effect/
|
|
43
|
+
import type * as HttpClient from "effect/http/HttpClient";
|
|
44
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
45
45
|
import type * as API from "@distilled.cloud/core/api";
|
|
46
46
|
import type { ConfigError } from "@distilled.cloud/core/errors";
|
|
47
47
|
import {
|
|
@@ -49,7 +49,10 @@ import {
|
|
|
49
49
|
type RestErrorEnvelope,
|
|
50
50
|
} from "@distilled.cloud/core/protocol-rest";
|
|
51
51
|
import { Credentials, type Config } from "./credentials.ts";
|
|
52
|
-
import {
|
|
52
|
+
import {
|
|
53
|
+
LitellmParseError,
|
|
54
|
+
UnknownLitellmError,
|
|
55
|
+
type DefaultErrors } from "./errors.ts";
|
|
53
56
|
|
|
54
57
|
/**
|
|
55
58
|
* Error channel shared by every generated LiteLLM operation. Generated
|
|
@@ -146,6 +149,8 @@ export const LitellmProtocol: Layer.Layer<API.Protocol> =
|
|
|
146
149
|
Accept: "application/json",
|
|
147
150
|
}),
|
|
148
151
|
errorEnvelope,
|
|
152
|
+
// A 2xx body that fails strict output validation (core rc.13).
|
|
153
|
+
parseError: ({ body, cause }) => new LitellmParseError({ body, cause }),
|
|
149
154
|
unknownError: ({ code, message, body }) =>
|
|
150
155
|
new UnknownLitellmError({
|
|
151
156
|
code:
|