@effect/ai-openrouter 0.8.3 → 4.0.0-beta.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.
Files changed (80) hide show
  1. package/dist/Generated.d.ts +19505 -0
  2. package/dist/Generated.d.ts.map +1 -0
  3. package/dist/Generated.js +5115 -0
  4. package/dist/Generated.js.map +1 -0
  5. package/dist/OpenRouterClient.d.ts +116 -0
  6. package/dist/OpenRouterClient.d.ts.map +1 -0
  7. package/dist/OpenRouterClient.js +120 -0
  8. package/dist/OpenRouterClient.js.map +1 -0
  9. package/dist/{dts/OpenRouterConfig.d.ts → OpenRouterConfig.d.ts} +9 -9
  10. package/dist/OpenRouterConfig.d.ts.map +1 -0
  11. package/dist/{esm/OpenRouterConfig.js → OpenRouterConfig.js} +8 -5
  12. package/dist/OpenRouterConfig.js.map +1 -0
  13. package/dist/OpenRouterError.d.ts +83 -0
  14. package/dist/OpenRouterError.d.ts.map +1 -0
  15. package/dist/OpenRouterError.js +10 -0
  16. package/dist/OpenRouterError.js.map +1 -0
  17. package/dist/OpenRouterLanguageModel.d.ts +285 -0
  18. package/dist/OpenRouterLanguageModel.d.ts.map +1 -0
  19. package/dist/OpenRouterLanguageModel.js +1210 -0
  20. package/dist/OpenRouterLanguageModel.js.map +1 -0
  21. package/dist/index.d.ts +29 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +30 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/internal/errors.d.ts +2 -0
  26. package/dist/internal/errors.d.ts.map +1 -0
  27. package/dist/internal/errors.js +347 -0
  28. package/dist/internal/errors.js.map +1 -0
  29. package/dist/{dts/internal → internal}/utilities.d.ts.map +1 -1
  30. package/dist/internal/utilities.js +77 -0
  31. package/dist/internal/utilities.js.map +1 -0
  32. package/package.json +45 -62
  33. package/src/Generated.ts +9312 -5435
  34. package/src/OpenRouterClient.ts +223 -304
  35. package/src/OpenRouterConfig.ts +14 -14
  36. package/src/OpenRouterError.ts +92 -0
  37. package/src/OpenRouterLanguageModel.ts +941 -570
  38. package/src/index.ts +20 -4
  39. package/src/internal/errors.ts +373 -0
  40. package/src/internal/utilities.ts +78 -11
  41. package/Generated/package.json +0 -6
  42. package/OpenRouterClient/package.json +0 -6
  43. package/OpenRouterConfig/package.json +0 -6
  44. package/OpenRouterLanguageModel/package.json +0 -6
  45. package/README.md +0 -5
  46. package/dist/cjs/Generated.js +0 -5813
  47. package/dist/cjs/Generated.js.map +0 -1
  48. package/dist/cjs/OpenRouterClient.js +0 -229
  49. package/dist/cjs/OpenRouterClient.js.map +0 -1
  50. package/dist/cjs/OpenRouterConfig.js +0 -30
  51. package/dist/cjs/OpenRouterConfig.js.map +0 -1
  52. package/dist/cjs/OpenRouterLanguageModel.js +0 -825
  53. package/dist/cjs/OpenRouterLanguageModel.js.map +0 -1
  54. package/dist/cjs/index.js +0 -16
  55. package/dist/cjs/index.js.map +0 -1
  56. package/dist/cjs/internal/utilities.js +0 -29
  57. package/dist/cjs/internal/utilities.js.map +0 -1
  58. package/dist/dts/Generated.d.ts +0 -11026
  59. package/dist/dts/Generated.d.ts.map +0 -1
  60. package/dist/dts/OpenRouterClient.d.ts +0 -407
  61. package/dist/dts/OpenRouterClient.d.ts.map +0 -1
  62. package/dist/dts/OpenRouterConfig.d.ts.map +0 -1
  63. package/dist/dts/OpenRouterLanguageModel.d.ts +0 -215
  64. package/dist/dts/OpenRouterLanguageModel.d.ts.map +0 -1
  65. package/dist/dts/index.d.ts +0 -17
  66. package/dist/dts/index.d.ts.map +0 -1
  67. package/dist/esm/Generated.js +0 -5457
  68. package/dist/esm/Generated.js.map +0 -1
  69. package/dist/esm/OpenRouterClient.js +0 -214
  70. package/dist/esm/OpenRouterClient.js.map +0 -1
  71. package/dist/esm/OpenRouterConfig.js.map +0 -1
  72. package/dist/esm/OpenRouterLanguageModel.js +0 -814
  73. package/dist/esm/OpenRouterLanguageModel.js.map +0 -1
  74. package/dist/esm/index.js +0 -17
  75. package/dist/esm/index.js.map +0 -1
  76. package/dist/esm/internal/utilities.js +0 -21
  77. package/dist/esm/internal/utilities.js.map +0 -1
  78. package/dist/esm/package.json +0 -4
  79. package/index/package.json +0 -6
  80. /package/dist/{dts/internal → internal}/utilities.d.ts +0 -0
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Config from "effect/Config";
5
+ import * as Effect from "effect/Effect";
6
+ import * as Layer from "effect/Layer";
7
+ import type * as Redacted from "effect/Redacted";
8
+ import * as ServiceMap from "effect/ServiceMap";
9
+ import * as Stream from "effect/Stream";
10
+ import type * as AiError from "effect/unstable/ai/AiError";
11
+ import * as HttpClient from "effect/unstable/http/HttpClient";
12
+ import type * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
13
+ import * as Generated from "./Generated.ts";
14
+ /**
15
+ * The OpenRouter client service interface.
16
+ *
17
+ * Provides methods for interacting with OpenRouter's Chat Completions API,
18
+ * including both synchronous and streaming message creation.
19
+ *
20
+ * @since 1.0.0
21
+ * @category models
22
+ */
23
+ export interface Service {
24
+ readonly client: Generated.OpenRouterClient;
25
+ readonly createChatCompletion: (options: typeof Generated.ChatGenerationParams.Encoded) => Effect.Effect<[
26
+ body: typeof Generated.SendChatCompletionRequest200.Type,
27
+ response: HttpClientResponse.HttpClientResponse
28
+ ], AiError.AiError>;
29
+ readonly createChatCompletionStream: (options: Omit<typeof Generated.ChatGenerationParams.Encoded, "stream" | "stream_options">) => Effect.Effect<[
30
+ response: HttpClientResponse.HttpClientResponse,
31
+ stream: Stream.Stream<ChatStreamingResponseChunkData, AiError.AiError>
32
+ ], AiError.AiError>;
33
+ }
34
+ /**
35
+ * @since 1.0.0
36
+ * @category Models
37
+ */
38
+ export type ChatStreamingResponseChunkData = typeof Generated.ChatStreamingResponseChunk.fields.data.Type;
39
+ declare const OpenRouterClient_base: ServiceMap.ServiceClass<OpenRouterClient, "@effect/ai-openrouter/OpenRouterClient", Service>;
40
+ /**
41
+ * Service identifier for the OpenRouter client.
42
+ *
43
+ * @since 1.0.0
44
+ * @category service
45
+ */
46
+ export declare class OpenRouterClient extends OpenRouterClient_base {
47
+ }
48
+ /**
49
+ * Configuration options for creating an OpenRouter client.
50
+ *
51
+ * @since 1.0.0
52
+ * @category models
53
+ */
54
+ export type Options = {
55
+ readonly apiKey?: Redacted.Redacted<string> | undefined;
56
+ readonly apiUrl?: string | undefined;
57
+ /**
58
+ * Optional URL of your site for rankings on `openrouter.ai`.
59
+ */
60
+ readonly siteReferrer?: string | undefined;
61
+ /**
62
+ * Optional title of your site for rankings on `openrouter.ai`.
63
+ */
64
+ readonly siteTitle?: string | undefined;
65
+ /**
66
+ * Optional transformer for the underlying HTTP client.
67
+ *
68
+ * Use this to add middleware, logging, or custom request/response handling.
69
+ */
70
+ readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined;
71
+ };
72
+ /**
73
+ * Creates an OpenRouter client service with the given options.
74
+ *
75
+ * @since 1.0.0
76
+ * @category constructors
77
+ */
78
+ export declare const make: (options: Options) => Effect.Effect<Service, never, HttpClient.HttpClient>;
79
+ /**
80
+ * Creates a layer for the OpenRouter client with the given options.
81
+ *
82
+ * @since 1.0.0
83
+ * @category layers
84
+ */
85
+ export declare const layer: (options: Options) => Layer.Layer<OpenRouterClient, never, HttpClient.HttpClient>;
86
+ /**
87
+ * Creates a layer for the OpenRouter client, loading the requisite
88
+ * configuration via Effect's `Config` module.
89
+ *
90
+ * @since 1.0.0
91
+ * @category layers
92
+ */
93
+ export declare const layerConfig: (options?: {
94
+ /**
95
+ * The config value to load for the API key.
96
+ */
97
+ readonly apiKey?: Config.Config<Redacted.Redacted<string>> | undefined;
98
+ /**
99
+ * The config value to load for the API URL.
100
+ */
101
+ readonly apiUrl?: Config.Config<string> | undefined;
102
+ /**
103
+ * The config value to load for the site referrer URL.
104
+ */
105
+ readonly siteReferrer?: Config.Config<string> | undefined;
106
+ /**
107
+ * The config value to load for the site title.
108
+ */
109
+ readonly siteTitle?: Config.Config<string> | undefined;
110
+ /**
111
+ * Optional transformer for the HTTP client.
112
+ */
113
+ readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined;
114
+ }) => Layer.Layer<OpenRouterClient, Config.ConfigError, HttpClient.HttpClient>;
115
+ export {};
116
+ //# sourceMappingURL=OpenRouterClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterClient.d.ts","sourceRoot":"","sources":["../src/OpenRouterClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAEhD,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,OAAO,MAAM,4BAA4B,CAAA;AAG1D,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAE7D,OAAO,KAAK,KAAK,kBAAkB,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAQ3C;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,gBAAgB,CAAA;IAE3C,QAAQ,CAAC,oBAAoB,EAAE,CAC7B,OAAO,EAAE,OAAO,SAAS,CAAC,oBAAoB,CAAC,OAAO,KACnD,MAAM,CAAC,MAAM,CAChB;QAAC,IAAI,EAAE,OAAO,SAAS,CAAC,4BAA4B,CAAC,IAAI;QAAE,QAAQ,EAAE,kBAAkB,CAAC,kBAAkB;KAAC,EAC3G,OAAO,CAAC,OAAO,CAChB,CAAA;IAED,QAAQ,CAAC,0BAA0B,EAAE,CACnC,OAAO,EAAE,I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H,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,CAAA;IAEtE;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAEnD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAEzD;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAEtD;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,UAAU,KAAK,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;CAClG,KAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,CAAC,UAAU,CAwBxE,CAAA"}
@@ -0,0 +1,120 @@
1
+ import * as Effect from "effect/Effect";
2
+ import { identity } from "effect/Function";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Predicate from "effect/Predicate";
5
+ import * as Schema from "effect/Schema";
6
+ import * as ServiceMap from "effect/ServiceMap";
7
+ import * as Stream from "effect/Stream";
8
+ import * as Sse from "effect/unstable/encoding/Sse";
9
+ import * as HttpBody from "effect/unstable/http/HttpBody";
10
+ import * as HttpClient from "effect/unstable/http/HttpClient";
11
+ import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
12
+ import * as Generated from "./Generated.js";
13
+ import * as Errors from "./internal/errors.js";
14
+ import { OpenRouterConfig } from "./OpenRouterConfig.js";
15
+ // =============================================================================
16
+ // Service Identifier
17
+ // =============================================================================
18
+ /**
19
+ * Service identifier for the OpenRouter client.
20
+ *
21
+ * @since 1.0.0
22
+ * @category service
23
+ */
24
+ export class OpenRouterClient extends /*#__PURE__*/ServiceMap.Service()("@effect/ai-openrouter/OpenRouterClient") {}
25
+ // =============================================================================
26
+ // Constructor
27
+ // =============================================================================
28
+ /**
29
+ * Creates an OpenRouter client service with the given options.
30
+ *
31
+ * @since 1.0.0
32
+ * @category constructors
33
+ */
34
+ export const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
35
+ const baseClient = yield* HttpClient.HttpClient;
36
+ const httpClient = baseClient.pipe(HttpClient.mapRequest(request => request.pipe(HttpClientRequest.prependUrl(options.apiUrl ?? "https://openrouter.ai/api/v1"), options.apiKey ? HttpClientRequest.bearerToken(options.apiKey) : identity, options.siteReferrer ? HttpClientRequest.setHeader("HTTP-Referrer", options.siteReferrer) : identity, options.siteTitle ? HttpClientRequest.setHeader("X-Title", options.siteTitle) : identity, HttpClientRequest.acceptJson)), options.transformClient ?? identity);
37
+ const httpClientOk = HttpClient.filterStatusOk(httpClient);
38
+ const client = Generated.make(httpClient, {
39
+ transformClient: Effect.fnUntraced(function* (client) {
40
+ const config = yield* OpenRouterConfig.getOrUndefined;
41
+ if (Predicate.isNotUndefined(config?.transformClient)) {
42
+ return config.transformClient(client);
43
+ }
44
+ return client;
45
+ })
46
+ });
47
+ const createChatCompletion = payload => client.sendChatCompletionRequest({
48
+ payload,
49
+ config: {
50
+ includeResponse: true
51
+ }
52
+ }).pipe(Effect.catchTags({
53
+ SendChatCompletionRequest400: error => Effect.fail(Errors.mapClientError(error, "createChatCompletion")),
54
+ SendChatCompletionRequest401: error => Effect.fail(Errors.mapClientError(error, "createChatCompletion")),
55
+ SendChatCompletionRequest429: error => Effect.fail(Errors.mapClientError(error, "createChatCompletion")),
56
+ SendChatCompletionRequest500: error => Effect.fail(Errors.mapClientError(error, "createChatCompletion")),
57
+ HttpClientError: error => Errors.mapHttpClientError(error, "createChatCompletion"),
58
+ SchemaError: error => Effect.fail(Errors.mapSchemaError(error, "createChatCompletion"))
59
+ }));
60
+ const buildChatCompletionStream = response => {
61
+ const stream = response.stream.pipe(Stream.decodeText(), Stream.pipeThroughChannel(Sse.decode()), Stream.mapEffect(event => decodeChatCompletionSseData(event.data)), Stream.takeWhile(data => data !== "[DONE]"), Stream.catchTags({
62
+ // TODO: handle SSE retries
63
+ Retry: error => Stream.die(error),
64
+ HttpClientError: error => Stream.fromEffect(Errors.mapHttpClientError(error, "createChatCompletionStream")),
65
+ SchemaError: error => Stream.fail(Errors.mapSchemaError(error, "createChatCompletionStream"))
66
+ }));
67
+ return [response, stream];
68
+ };
69
+ const createChatCompletionStream = payload => httpClientOk.execute(HttpClientRequest.post("/chat/completions", {
70
+ body: HttpBody.jsonUnsafe({
71
+ ...payload,
72
+ stream: true,
73
+ stream_options: {
74
+ include_usage: true
75
+ }
76
+ })
77
+ })).pipe(Effect.map(buildChatCompletionStream), Effect.catchTag("HttpClientError", error => Errors.mapHttpClientError(error, "createChatCompletionStream")));
78
+ return OpenRouterClient.of({
79
+ client,
80
+ createChatCompletion,
81
+ createChatCompletionStream
82
+ });
83
+ });
84
+ // =============================================================================
85
+ // Layers
86
+ // =============================================================================
87
+ /**
88
+ * Creates a layer for the OpenRouter client with the given options.
89
+ *
90
+ * @since 1.0.0
91
+ * @category layers
92
+ */
93
+ export const layer = options => Layer.effect(OpenRouterClient, make(options));
94
+ /**
95
+ * Creates a layer for the OpenRouter client, loading the requisite
96
+ * configuration via Effect's `Config` module.
97
+ *
98
+ * @since 1.0.0
99
+ * @category layers
100
+ */
101
+ export const layerConfig = options => Layer.effect(OpenRouterClient, Effect.gen(function* () {
102
+ const apiKey = Predicate.isNotUndefined(options?.apiKey) ? yield* options.apiKey : undefined;
103
+ const apiUrl = Predicate.isNotUndefined(options?.apiUrl) ? yield* options.apiUrl : undefined;
104
+ const siteReferrer = Predicate.isNotUndefined(options?.siteReferrer) ? yield* options.siteReferrer : undefined;
105
+ const siteTitle = Predicate.isNotUndefined(options?.siteTitle) ? yield* options.siteTitle : undefined;
106
+ return yield* make({
107
+ apiKey,
108
+ apiUrl,
109
+ siteReferrer,
110
+ siteTitle,
111
+ transformClient: options?.transformClient
112
+ });
113
+ }));
114
+ // =============================================================================
115
+ // Internal Utilities
116
+ // =============================================================================
117
+ const ChatStreamingResponseChunkDataFromString = /*#__PURE__*/Schema.fromJsonString(Generated.ChatStreamingResponseChunk.fields.data);
118
+ const decodeChatStreamingResponseChunkData = /*#__PURE__*/Schema.decodeUnknownEffect(ChatStreamingResponseChunkDataFromString);
119
+ const decodeChatCompletionSseData = data => data === "[DONE]" ? Effect.succeed(data) : decodeChatStreamingResponseChunkData(data);
120
+ //# sourceMappingURL=OpenRouterClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterClient.js","names":["Effect","identity","Layer","Predicate","Schema","ServiceMap","Stream","Sse","HttpBody","HttpClient","HttpClientRequest","Generated","Errors","OpenRouterConfig","OpenRouterClient","Service","make","fnUntraced","options","baseClient","httpClient","pipe","mapRequest","request","prependUrl","apiUrl","apiKey","bearerToken","siteReferrer","setHeader","siteTitle","acceptJson","transformClient","httpClientOk","filterStatusOk","client","config","getOrUndefined","isNotUndefined","createChatCompletion","payload","sendChatCompletionRequest","includeResponse","catchTags","SendChatCompletionRequest400","error","fail","mapClientError","SendChatCompletionRequest401","SendChatCompletionRequest429","SendChatCompletionRequest500","HttpClientError","mapHttpClientError","SchemaError","mapSchemaError","buildChatCompletionStream","response","stream","decodeText","pipeThroughChannel","decode","mapEffect","event","decodeChatCompletionSseData","data","takeWhile","Retry","die","fromEffect","createChatCompletionStream","execute","post","body","jsonUnsafe","stream_options","include_usage","map","catchTag","of","layer","effect","layerConfig","gen","undefined","ChatStreamingResponseChunkDataFromString","fromJsonString","ChatStreamingResponseChunk","fields","decodeChatStreamingResponseChunkData","decodeUnknownEffect","succeed"],"sources":["../src/OpenRouterClient.ts"],"sourcesContent":[null],"mappings":"AAIA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,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e,EAAEd,OAAO,EAAEc;GAC3B,CAAC;AACJ,CAAC,CAAC,CACH;AAEH;AACA;AACA;AAEA,MAAMoD,wCAAwC,gBAAGhF,MAAM,CAACiF,cAAc,CAAC1E,SAAS,CAAC2E,0BAA0B,CAACC,MAAM,CAACvB,IAAI,CAAC;AACxH,MAAMwB,oCAAoC,gBAAGpF,MAAM,CAACqF,mBAAmB,CAACL,wCAAwC,CAAC;AAEjH,MAAMrB,2BAA2B,GAC/BC,IAAY,IAEZA,IAAI,KAAK,QAAQ,GACbhE,MAAM,CAAC0F,OAAO,CAAC1B,IAAI,CAAC,GACpBwB,oCAAoC,CAACxB,IAAI,CAAC","ignoreList":[]}
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @since 1.0.0
3
3
  */
4
- import type { HttpClient } from "@effect/platform/HttpClient";
5
- import * as Context from "effect/Context";
6
4
  import * as Effect from "effect/Effect";
7
- declare const OpenRouterConfig_base: Context.TagClass<OpenRouterConfig, "@effect/ai-openrouter/OpenRouterConfig", OpenRouterConfig.Service>;
5
+ import * as ServiceMap from "effect/ServiceMap";
6
+ import type { HttpClient } from "effect/unstable/http/HttpClient";
7
+ declare const OpenRouterConfig_base: ServiceMap.ServiceClass<OpenRouterConfig, "@effect/ai-openrouter/OpenRouterConfig", OpenRouterConfig.Service>;
8
8
  /**
9
9
  * @since 1.0.0
10
- * @category Context
10
+ * @category services
11
11
  */
12
12
  export declare class OpenRouterConfig extends OpenRouterConfig_base {
13
13
  /**
@@ -21,25 +21,25 @@ export declare class OpenRouterConfig extends OpenRouterConfig_base {
21
21
  export declare namespace OpenRouterConfig {
22
22
  /**
23
23
  * @since 1.0.0
24
- * @category Models
24
+ * @category models
25
25
  */
26
26
  interface Service {
27
- readonly transformClient?: (client: HttpClient) => HttpClient;
27
+ readonly transformClient?: ((client: HttpClient) => HttpClient) | undefined;
28
28
  }
29
29
  }
30
30
  /**
31
31
  * @since 1.0.0
32
- * @category Configuration
32
+ * @category configuration
33
33
  */
34
34
  export declare const withClientTransform: {
35
35
  /**
36
36
  * @since 1.0.0
37
- * @category Configuration
37
+ * @category configuration
38
38
  */
39
39
  (transform: (client: HttpClient) => HttpClient): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
40
40
  /**
41
41
  * @since 1.0.0
42
- * @category Configuration
42
+ * @category configuration
43
43
  */
44
44
  <A, E, R>(self: Effect.Effect<A, E, R>, transform: (client: HttpClient) => HttpClient): Effect.Effect<A, E, R>;
45
45
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterConfig.d.ts","sourceRoot":"","sources":["../src/OpenRouterConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;;AAEjE;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,qBAGO;IAC3C;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,CAGzF;CACF;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC;;;OAGG;IACH,UAAiB,OAAO;QACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,GAAG,SAAS,CAAA;KAC5E;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAChC;;;OAGG;IACH,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IAClH;;;OAGG;IACH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACN,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,GAC5C,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAsB1B,CAAA"}
@@ -1,19 +1,22 @@
1
- import * as Context from "effect/Context";
1
+ /**
2
+ * @since 1.0.0
3
+ */
2
4
  import * as Effect from "effect/Effect";
3
5
  import { dual } from "effect/Function";
6
+ import * as ServiceMap from "effect/ServiceMap";
4
7
  /**
5
8
  * @since 1.0.0
6
- * @category Context
9
+ * @category services
7
10
  */
8
- export class OpenRouterConfig extends /*#__PURE__*/Context.Tag("@effect/ai-openrouter/OpenRouterConfig")() {
11
+ export class OpenRouterConfig extends /*#__PURE__*/ServiceMap.Service()("@effect/ai-openrouter/OpenRouterConfig") {
9
12
  /**
10
13
  * @since 1.0.0
11
14
  */
12
- static getOrUndefined = /*#__PURE__*/Effect.map(/*#__PURE__*/Effect.context(), context => context.unsafeMap.get(OpenRouterConfig.key));
15
+ static getOrUndefined = /*#__PURE__*/Effect.map(/*#__PURE__*/Effect.services(), services => services.mapUnsafe.get(OpenRouterConfig.key));
13
16
  }
14
17
  /**
15
18
  * @since 1.0.0
16
- * @category Configuration
19
+ * @category configuration
17
20
  */
18
21
  export const withClientTransform = /*#__PURE__*/dual(2, (self, transformClient) => Effect.flatMap(OpenRouterConfig.getOrUndefined, config => Effect.provideService(self, OpenRouterConfig, {
19
22
  ...config,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterConfig.js","names":["Effect","dual","ServiceMap","OpenRouterConfig","Service","getOrUndefined","map","services","mapUnsafe","get","key","withClientTransform","self","transformClient","flatMap","config","provideService"],"sources":["../src/OpenRouterConfig.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,SAASC,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,UAAU,MAAM,mBAAmB;AAG/C;;;;AAIA,OAAM,MAAOC,gBAAiB,sBAAQD,UAAU,CAACE,OAAO,EAGrD,CAAC,wCAAwC,CAAC;EAC3C;;;EAGA,OAAgBC,cAAc,gBAA+DL,MAAM,CAACM,GAAG,cACrGN,MAAM,CAACO,QAAQ,EAAS,EACvBA,QAAQ,IAAKA,QAAQ,CAACC,SAAS,CAACC,GAAG,CAACN,gBAAgB,CAACO,GAAG,CAAC,CAC3D;;AAgBH;;;;AAIA,OAAO,MAAMC,mBAAmB,gBAc5BV,IAAI,CAeN,CAAC,EACD,CAACW,IAAI,EAAEC,eAAe,KACpBb,MAAM,CAACc,OAAO,CACZX,gBAAgB,CAACE,cAAc,EAC9BU,MAAM,IAAKf,MAAM,CAACgB,cAAc,CAACJ,IAAI,EAAET,gBAAgB,EAAE;EAAE,GAAGY,MAAM;EAAEF;AAAe,CAAE,CAAC,CAC1F,CACJ","ignoreList":[]}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * OpenRouter error metadata augmentation.
3
+ *
4
+ * Provides OpenRouter-specific metadata fields for AI error types through
5
+ * module augmentation, enabling typed access to OpenRouter error details.
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+ /**
10
+ * OpenRouter-specific error metadata fields.
11
+ *
12
+ * @since 1.0.0
13
+ * @category models
14
+ */
15
+ export type OpenRouterErrorMetadata = {
16
+ /**
17
+ * The error code returned by the API.
18
+ */
19
+ readonly errorCode: string | number | null;
20
+ /**
21
+ * The error type returned by the API.
22
+ */
23
+ readonly errorType: string | null;
24
+ /**
25
+ * The unique request ID for debugging.
26
+ */
27
+ readonly requestId: string | null;
28
+ };
29
+ /**
30
+ * OpenRouter-specific rate limit metadata fields.
31
+ *
32
+ * @since 1.0.0
33
+ * @category models
34
+ */
35
+ export type OpenRouterRateLimitMetadata = OpenRouterErrorMetadata & {
36
+ readonly limit: string | null;
37
+ readonly remaining: number | null;
38
+ readonly resetRequests: string | null;
39
+ readonly resetTokens: string | null;
40
+ };
41
+ declare module "effect/unstable/ai/AiError" {
42
+ interface RateLimitError {
43
+ readonly metadata: {
44
+ readonly openrouter?: OpenRouterRateLimitMetadata | null;
45
+ };
46
+ }
47
+ interface QuotaExhaustedError {
48
+ readonly metadata: {
49
+ readonly openrouter?: OpenRouterErrorMetadata | null;
50
+ };
51
+ }
52
+ interface AuthenticationError {
53
+ readonly metadata: {
54
+ readonly openrouter?: OpenRouterErrorMetadata | null;
55
+ };
56
+ }
57
+ interface ContentPolicyError {
58
+ readonly metadata: {
59
+ readonly openrouter?: OpenRouterErrorMetadata | null;
60
+ };
61
+ }
62
+ interface InvalidRequestError {
63
+ readonly metadata: {
64
+ readonly openrouter?: OpenRouterErrorMetadata | null;
65
+ };
66
+ }
67
+ interface InternalProviderError {
68
+ readonly metadata: {
69
+ readonly openrouter?: OpenRouterErrorMetadata | null;
70
+ };
71
+ }
72
+ interface InvalidOutputError {
73
+ readonly metadata: {
74
+ readonly openrouter?: OpenRouterErrorMetadata | null;
75
+ };
76
+ }
77
+ interface UnknownError {
78
+ readonly metadata: {
79
+ readonly openrouter?: OpenRouterErrorMetadata | null;
80
+ };
81
+ }
82
+ }
83
+ //# sourceMappingURL=OpenRouterError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterError.d.ts","sourceRoot":"","sources":["../src/OpenRouterError.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC1C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,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YACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAA;SACrD,CAAA;KACF;IAED,UAAiB,YAAY;QAC3B,QAAQ,CAAC,QAAQ,EAAE;YACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAA;SACrD,CAAA;KACF;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * OpenRouter error metadata augmentation.
3
+ *
4
+ * Provides OpenRouter-specific metadata fields for AI error types through
5
+ * module augmentation, enabling typed access to OpenRouter error details.
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=OpenRouterError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenRouterError.js","names":[],"sources":["../src/OpenRouterError.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]}