@opencode/ai 0.0.0-dev-177 → 0.0.0-dev-189

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 (65) hide show
  1. package/README.md +13 -58
  2. package/dist/image-client.d.ts +45 -0
  3. package/dist/index.d.ts +36 -19
  4. package/dist/index.js +13 -2
  5. package/dist/media-client.d.ts +1 -0
  6. package/dist/media-client.js +1 -0
  7. package/dist/provider-error.js +0 -2
  8. package/dist/providers/digitalocean/responses.d.ts +4 -0
  9. package/dist/providers/digitalocean/responses.js +1 -0
  10. package/dist/providers/digitalocean.d.ts +206 -4
  11. package/dist/providers/digitalocean.js +17 -6
  12. package/dist/providers/index.d.ts +0 -4
  13. package/dist/providers/index.js +0 -4
  14. package/dist/providers/openrouter/responses.d.ts +4 -0
  15. package/dist/providers/openrouter/responses.js +1 -0
  16. package/dist/providers/openrouter.d.ts +207 -5
  17. package/dist/providers/openrouter.js +20 -11
  18. package/dist/providers/venice/responses.d.ts +4 -0
  19. package/dist/providers/venice/responses.js +1 -0
  20. package/dist/providers/venice.d.ts +206 -4
  21. package/dist/providers/venice.js +33 -17
  22. package/dist/route/auth.d.ts +1 -1
  23. package/dist/route/media-protocol.d.ts +2 -4
  24. package/dist/route/media.d.ts +1 -1
  25. package/dist/route/media.js +2 -4
  26. package/dist/speech-client.d.ts +48 -0
  27. package/dist/testing/decision.d.ts +16 -0
  28. package/dist/testing/decision.js +20 -0
  29. package/dist/testing/image.d.ts +14 -0
  30. package/dist/testing/image.js +12 -0
  31. package/dist/testing/media.d.ts +18 -0
  32. package/dist/testing/media.js +36 -0
  33. package/dist/testing/script.d.ts +28 -0
  34. package/dist/testing/script.js +60 -0
  35. package/dist/testing/speech.d.ts +14 -0
  36. package/dist/testing/speech.js +12 -0
  37. package/dist/testing/transcription.d.ts +14 -0
  38. package/dist/testing/transcription.js +12 -0
  39. package/dist/testing/video.d.ts +14 -0
  40. package/dist/testing/video.js +12 -0
  41. package/dist/testing.d.ts +10 -21
  42. package/dist/testing.js +11 -54
  43. package/dist/transcription-client.d.ts +64 -0
  44. package/dist/video-client.d.ts +41 -0
  45. package/package.json +14 -18
  46. package/dist/protocols/bfl-images.d.ts +0 -47
  47. package/dist/protocols/bfl-images.js +0 -155
  48. package/dist/protocols/fal-images.d.ts +0 -36
  49. package/dist/protocols/fal-images.js +0 -96
  50. package/dist/protocols/fal-video.d.ts +0 -29
  51. package/dist/protocols/fal-video.js +0 -73
  52. package/dist/protocols/replicate-images.d.ts +0 -28
  53. package/dist/protocols/replicate-images.js +0 -127
  54. package/dist/protocols/stability-images.d.ts +0 -44
  55. package/dist/protocols/stability-images.js +0 -131
  56. package/dist/protocols/utils/fal-queue.d.ts +0 -26
  57. package/dist/protocols/utils/fal-queue.js +0 -67
  58. package/dist/providers/black-forest-labs.d.ts +0 -21
  59. package/dist/providers/black-forest-labs.js +0 -23
  60. package/dist/providers/fal.d.ts +0 -24
  61. package/dist/providers/fal.js +0 -26
  62. package/dist/providers/replicate.d.ts +0 -21
  63. package/dist/providers/replicate.js +0 -17
  64. package/dist/providers/stability.d.ts +0 -23
  65. package/dist/providers/stability.js +0 -18
@@ -5,12 +5,13 @@ import { Route, type RouteDefaultsInput } from "../route/client.js";
5
5
  import { Protocol } from "../route/protocol.js";
6
6
  import { type ModelID, type ProviderOptions } from "../schema/index.js";
7
7
  import type { OpenAIProviderOptionsInput } from "./openai-options.js";
8
+ import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
8
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
10
  export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
10
11
  readonly baseURL?: string;
11
- readonly providerOptions?: OpenAIProviderOptionsInput;
12
+ readonly providerOptions?: OpenAIProviderOptionsInput | OpenResponsesProviderOptionsInput;
12
13
  };
13
- export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & {
14
+ export type Settings<Options = OpenAIProviderOptionsInput> = ProviderPackage.Settings & Options & {
14
15
  readonly apiKey?: string;
15
16
  };
16
17
  export declare const protocol: Protocol<{
@@ -437,7 +438,204 @@ export declare const route: Route<{
437
438
  readonly seed?: number | undefined;
438
439
  readonly stop?: readonly string[] | undefined;
439
440
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
440
- export declare const routes: Route<{
441
+ export declare const routes: (Route<{
442
+ readonly model: string;
443
+ readonly input: readonly ({
444
+ readonly type: "configuration_update";
445
+ readonly reasoning: {
446
+ readonly effort: import("../schema/options.js").ReasoningEffort;
447
+ };
448
+ } | {
449
+ readonly type: "message";
450
+ readonly role: "system";
451
+ readonly content: string;
452
+ } | {
453
+ readonly type: "message";
454
+ readonly role: "developer";
455
+ readonly content: string;
456
+ } | {
457
+ readonly type: "custom_tool_call_output" | "function_call_output";
458
+ readonly call_id: string;
459
+ readonly output: string | readonly ({
460
+ readonly type: "input_text";
461
+ readonly text: string;
462
+ } | {
463
+ readonly type: "input_video";
464
+ readonly video_url: string;
465
+ } | {
466
+ readonly type: "input_image";
467
+ readonly image_url: string;
468
+ readonly detail?: string | undefined;
469
+ } | {
470
+ readonly type: "input_file";
471
+ readonly filename: string;
472
+ readonly detail?: string | undefined;
473
+ readonly file_data?: string | undefined;
474
+ readonly file_url?: string | undefined;
475
+ })[];
476
+ } | {
477
+ readonly type: "reasoning";
478
+ readonly id?: string | undefined;
479
+ readonly summary: readonly {
480
+ readonly type: "summary_text";
481
+ readonly text: string;
482
+ }[];
483
+ readonly encrypted_content?: string | null | undefined;
484
+ } | {
485
+ readonly type: "compaction";
486
+ readonly id?: string | null | undefined;
487
+ readonly encrypted_content: string;
488
+ } | {
489
+ readonly type: "message";
490
+ readonly role: "user";
491
+ readonly content: readonly ({
492
+ readonly type: "input_text";
493
+ readonly text: string;
494
+ } | {
495
+ readonly type: "input_video";
496
+ readonly video_url: string;
497
+ } | {
498
+ readonly type: "input_image";
499
+ readonly image_url: string;
500
+ readonly detail?: string | undefined;
501
+ } | {
502
+ readonly type: "input_file";
503
+ readonly filename: string;
504
+ readonly detail?: string | undefined;
505
+ readonly file_data?: string | undefined;
506
+ readonly file_url?: string | undefined;
507
+ })[];
508
+ readonly id?: string | undefined;
509
+ readonly status?: string | undefined;
510
+ } | {
511
+ readonly type: "message";
512
+ readonly id?: string | undefined;
513
+ readonly role: "assistant";
514
+ readonly content: readonly {
515
+ readonly type: "output_text";
516
+ readonly text: string;
517
+ }[];
518
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
519
+ readonly status?: string | undefined;
520
+ } | {
521
+ readonly type: "function_call";
522
+ readonly id?: string | undefined;
523
+ readonly call_id: string;
524
+ readonly name: string;
525
+ readonly namespace?: string | undefined;
526
+ readonly arguments: string;
527
+ } | {
528
+ readonly type: "custom_tool_call";
529
+ readonly id?: string | undefined;
530
+ readonly call_id: string;
531
+ readonly name: string;
532
+ readonly input: string;
533
+ } | {
534
+ readonly [x: string]: unknown;
535
+ readonly type: "web_search_call";
536
+ readonly id: string;
537
+ readonly status?: string | undefined;
538
+ readonly action?: {
539
+ readonly [x: string]: unknown;
540
+ } | null | undefined;
541
+ } | {
542
+ readonly [x: string]: unknown;
543
+ readonly type: "file_search_call";
544
+ readonly id: string;
545
+ readonly status?: string | undefined;
546
+ readonly queries?: readonly string[] | undefined;
547
+ readonly results?: readonly {
548
+ readonly [x: string]: unknown;
549
+ }[] | null | undefined;
550
+ } | {
551
+ readonly [x: string]: unknown;
552
+ readonly type: "code_interpreter_call";
553
+ readonly id: string;
554
+ readonly status?: string | undefined;
555
+ readonly code?: string | null | undefined;
556
+ readonly container_id?: string | null | undefined;
557
+ readonly outputs?: readonly {
558
+ readonly [x: string]: unknown;
559
+ }[] | null | undefined;
560
+ } | {
561
+ readonly [x: string]: unknown;
562
+ readonly type: "mcp_call";
563
+ readonly id: string;
564
+ readonly status?: string | undefined;
565
+ readonly server_label?: string | undefined;
566
+ readonly name?: string | undefined;
567
+ readonly arguments?: string | undefined;
568
+ readonly output?: string | null | undefined;
569
+ readonly error?: unknown;
570
+ } | {
571
+ readonly [x: string]: unknown;
572
+ readonly type: string;
573
+ readonly id: string;
574
+ })[];
575
+ readonly instructions?: string | undefined;
576
+ readonly tools?: readonly ({
577
+ readonly type: "custom";
578
+ readonly name: string;
579
+ readonly description: string;
580
+ readonly format: {
581
+ readonly type: "text";
582
+ } | {
583
+ readonly type: "grammar";
584
+ readonly syntax: "lark" | "regex";
585
+ readonly definition: string;
586
+ };
587
+ } | {
588
+ readonly type: "function";
589
+ readonly name: string;
590
+ readonly description: string;
591
+ readonly parameters: {
592
+ readonly [x: string]: unknown;
593
+ };
594
+ readonly strict?: boolean | undefined;
595
+ } | {
596
+ readonly [x: string]: unknown;
597
+ readonly type: string;
598
+ })[] | undefined;
599
+ readonly tool_choice?: "auto" | "none" | "required" | {
600
+ readonly type: "custom" | "function";
601
+ readonly name: string;
602
+ } | {
603
+ readonly type: "allowed_tools";
604
+ readonly mode: "auto" | "none" | "required";
605
+ readonly tools: readonly {
606
+ readonly type: "custom" | "function";
607
+ readonly name: string;
608
+ }[];
609
+ } | undefined;
610
+ readonly store?: boolean | undefined;
611
+ readonly metadata?: {
612
+ readonly [x: string]: string;
613
+ } | undefined;
614
+ readonly safety_identifier?: string | undefined;
615
+ readonly stream_options?: {
616
+ readonly include_obfuscation?: boolean | undefined;
617
+ } | undefined;
618
+ readonly top_logprobs?: number | undefined;
619
+ readonly truncation?: "auto" | "disabled" | undefined;
620
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
621
+ readonly prompt_cache_key?: string | undefined;
622
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
623
+ readonly reasoning?: {
624
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
625
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
626
+ } | undefined;
627
+ readonly text?: {
628
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
629
+ } | undefined;
630
+ readonly max_output_tokens?: number | undefined;
631
+ readonly max_tool_calls?: number | undefined;
632
+ readonly parallel_tool_calls?: boolean | undefined;
633
+ readonly temperature?: number | undefined;
634
+ readonly top_p?: number | undefined;
635
+ readonly presence_penalty?: number | undefined;
636
+ readonly frequency_penalty?: number | undefined;
637
+ readonly stream: true;
638
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
441
639
  readonly model: string;
442
640
  readonly messages: readonly ({
443
641
  readonly role: "system";
@@ -610,10 +808,11 @@ export declare const routes: Route<{
610
808
  readonly presence_penalty?: number | undefined;
611
809
  readonly seed?: number | undefined;
612
810
  readonly stop?: readonly string[] | undefined;
613
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
811
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
614
812
  export declare const configure: (input?: Config) => {
615
813
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
616
814
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
815
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
617
816
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
618
817
  decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
619
818
  configure: typeof configure;
@@ -621,13 +820,16 @@ export declare const configure: (input?: Config) => {
621
820
  export declare const provider: {
622
821
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
623
822
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
823
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
624
824
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
625
825
  decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
626
826
  configure: typeof configure;
627
827
  };
628
828
  export declare const decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
629
829
  export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
830
+ export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
630
831
  export declare const model: ProviderPackage.Model<Settings, OpenAIProviderOptionsInput>;
832
+ export declare const responsesModel: ProviderPackage.Model<Settings<OpenResponsesProviderOptionsInput>, OpenResponsesProviderOptionsInput>;
631
833
  export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
632
834
  export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<import("../decision.js").DecisionOptions>;
633
835
  export * as DigitalOcean from "./digitalocean.js";
@@ -1,5 +1,6 @@
1
1
  import { OpenAIChat } from "../protocols/openai-chat.js";
2
2
  import { OpenAIImages } from "../protocols/openai-images.js";
3
+ import { OpenResponses } from "../protocols/open-responses.js";
3
4
  import { SystemOne } from "../protocols/system-one.js";
4
5
  import { cacheControl } from "../protocols/utils/cache.js";
5
6
  import { AuthOptions } from "../route/auth-options.js";
@@ -26,15 +27,22 @@ export const route = Route.make({
26
27
  endpoint: Endpoint.path("/chat/completions", { baseURL }),
27
28
  framing: OpenAIChat.framing,
28
29
  });
29
- export const routes = [route];
30
+ const responsesRoute = Route.make({
31
+ id: "digitalocean-responses",
32
+ provider: id,
33
+ providerMetadataKey: "digitalocean",
34
+ protocol: OpenResponses.protocol,
35
+ endpoint: Endpoint.path("/responses", { baseURL }),
36
+ transport: OpenResponses.httpTransport,
37
+ defaults: { providerOptions: { store: false, include: ["reasoning.encrypted_content"] } },
38
+ });
39
+ export const routes = [route, responsesRoute];
30
40
  export const configure = (input = {}) => {
31
41
  const { apiKey: _apiKey, auth: _auth, baseURL: endpoint, ...defaults } = input;
32
42
  const auth = AuthOptions.bearer(input, ["DIGITALOCEAN_ACCESS_TOKEN", "DIGITALOCEAN_API_KEY", "DO_INFERENCE_API_KEY"]);
33
- const configured = route.with({
34
- ...defaults,
35
- endpoint: { baseURL: endpoint ?? baseURL },
36
- auth,
37
- });
43
+ const options = { ...defaults, endpoint: { baseURL: endpoint ?? baseURL }, auth };
44
+ const configured = route.with(options);
45
+ const configuredResponses = responsesRoute.with(options);
38
46
  const decisionRoute = SystemOne.route.with({
39
47
  provider: id,
40
48
  providerMetadataKey: "digitalocean",
@@ -55,6 +63,7 @@ export const configure = (input = {}) => {
55
63
  supportsPromptCacheKey: true,
56
64
  },
57
65
  }),
66
+ responses: (modelID) => configuredResponses.model({ id: modelID }),
58
67
  image,
59
68
  decision,
60
69
  configure,
@@ -63,7 +72,9 @@ export const configure = (input = {}) => {
63
72
  export const provider = configure();
64
73
  export const decision = provider.decision;
65
74
  export const image = provider.image;
75
+ export const responses = provider.responses;
66
76
  export const model = (modelID, settings) => configure(config(settings)).model(modelID);
77
+ export const responsesModel = (modelID, settings) => configure(config(settings)).responses(modelID);
67
78
  export const imageModel = (modelID, settings) => {
68
79
  const input = config(settings);
69
80
  return configure(input).image(modelID, input.providerOptions);
@@ -6,7 +6,6 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
6
6
  export * as AssemblyAI from "./assemblyai.js";
7
7
  export * as Azure from "./azure.js";
8
8
  export * as Baseten from "./baseten.js";
9
- export * as BlackForestLabs from "./black-forest-labs.js";
10
9
  export * as Cartesia from "./cartesia.js";
11
10
  export * as Cerebras from "./cerebras.js";
12
11
  export * as Cohere from "./cohere.js";
@@ -17,7 +16,6 @@ export * as Deepgram from "./deepgram.js";
17
16
  export * as DeepSeek from "./deepseek.js";
18
17
  export * as DigitalOcean from "./digitalocean.js";
19
18
  export * as ElevenLabs from "./elevenlabs.js";
20
- export * as Fal from "./fal.js";
21
19
  export * as Fireworks from "./fireworks.js";
22
20
  export * as Google from "./google.js";
23
21
  export * as GoogleVertex from "./google-vertex.js";
@@ -36,9 +34,7 @@ export * as OpenAICompatible from "./openai-compatible.js";
36
34
  export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
37
35
  export * as OpenCode from "./opencode.js";
38
36
  export * as OpenRouter from "./openrouter.js";
39
- export * as Replicate from "./replicate.js";
40
37
  export * as Runway from "./runway.js";
41
- export * as Stability from "./stability.js";
42
38
  export * as TogetherAI from "./togetherai.js";
43
39
  export * as TypeSafeAI from "./typesafe-ai.js";
44
40
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
@@ -6,7 +6,6 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
6
6
  export * as AssemblyAI from "./assemblyai.js";
7
7
  export * as Azure from "./azure.js";
8
8
  export * as Baseten from "./baseten.js";
9
- export * as BlackForestLabs from "./black-forest-labs.js";
10
9
  export * as Cartesia from "./cartesia.js";
11
10
  export * as Cerebras from "./cerebras.js";
12
11
  export * as Cohere from "./cohere.js";
@@ -17,7 +16,6 @@ export * as Deepgram from "./deepgram.js";
17
16
  export * as DeepSeek from "./deepseek.js";
18
17
  export * as DigitalOcean from "./digitalocean.js";
19
18
  export * as ElevenLabs from "./elevenlabs.js";
20
- export * as Fal from "./fal.js";
21
19
  export * as Fireworks from "./fireworks.js";
22
20
  export * as Google from "./google.js";
23
21
  export * as GoogleVertex from "./google-vertex.js";
@@ -36,9 +34,7 @@ export * as OpenAICompatible from "./openai-compatible.js";
36
34
  export * as OpenAICompatibleResponses from "./openai-compatible-responses.js";
37
35
  export * as OpenCode from "./opencode.js";
38
36
  export * as OpenRouter from "./openrouter.js";
39
- export * as Replicate from "./replicate.js";
40
37
  export * as Runway from "./runway.js";
41
- export * as Stability from "./stability.js";
42
38
  export * as TogetherAI from "./togetherai.js";
43
39
  export * as TypeSafeAI from "./typesafe-ai.js";
44
40
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
@@ -0,0 +1,4 @@
1
+ import type { OpenResponsesProviderOptionsInput } from "../open-responses-options.js";
2
+ import type { OpenRouter } from "../openrouter.js";
3
+ export { responsesModel as model } from "../openrouter.js";
4
+ export type Settings = OpenRouter.Settings<OpenResponsesProviderOptionsInput>;
@@ -0,0 +1 @@
1
+ export { responsesModel as model } from "../openrouter.js";
@@ -5,6 +5,7 @@ import { type ProviderAuthOption } from "../route/auth-options.js";
5
5
  import { type ModelID, type OpenString, type ProviderOptions } from "../schema/index.js";
6
6
  import type { ProviderPackage } from "../provider-package.js";
7
7
  import { OpenAIChat } from "../protocols/openai-chat.js";
8
+ import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
8
9
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
9
10
  export interface OpenRouterProviderRouting {
10
11
  readonly [key: string]: unknown;
@@ -81,9 +82,9 @@ export interface OpenRouterDecisionOptions {
81
82
  }
82
83
  export type Config = Omit<RouteDefaultsInput, "providerOptions"> & ProviderAuthOption<"optional"> & {
83
84
  readonly baseURL?: string;
84
- readonly providerOptions?: OpenRouterProviderOptionsInput;
85
+ readonly providerOptions?: OpenRouterProviderOptionsInput | OpenResponsesProviderOptionsInput;
85
86
  };
86
- export type Settings = ProviderPackage.Settings & OpenRouterProviderOptionsInput & {
87
+ export type Settings<Options = OpenRouterProviderOptionsInput> = ProviderPackage.Settings & Options & {
87
88
  readonly apiKey?: string;
88
89
  readonly baseURL?: string;
89
90
  };
@@ -725,7 +726,204 @@ export declare const route: Route<{
725
726
  user?: string | undefined;
726
727
  reasoning?: Record<string, unknown> | undefined;
727
728
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
728
- export declare const routes: Route<{
729
+ export declare const routes: (Route<{
730
+ readonly model: string;
731
+ readonly input: readonly ({
732
+ readonly type: "configuration_update";
733
+ readonly reasoning: {
734
+ readonly effort: import("../schema/options.js").ReasoningEffort;
735
+ };
736
+ } | {
737
+ readonly type: "message";
738
+ readonly role: "system";
739
+ readonly content: string;
740
+ } | {
741
+ readonly type: "message";
742
+ readonly role: "developer";
743
+ readonly content: string;
744
+ } | {
745
+ readonly type: "custom_tool_call_output" | "function_call_output";
746
+ readonly call_id: string;
747
+ readonly output: string | readonly ({
748
+ readonly type: "input_text";
749
+ readonly text: string;
750
+ } | {
751
+ readonly type: "input_video";
752
+ readonly video_url: string;
753
+ } | {
754
+ readonly type: "input_image";
755
+ readonly image_url: string;
756
+ readonly detail?: string | undefined;
757
+ } | {
758
+ readonly type: "input_file";
759
+ readonly filename: string;
760
+ readonly detail?: string | undefined;
761
+ readonly file_data?: string | undefined;
762
+ readonly file_url?: string | undefined;
763
+ })[];
764
+ } | {
765
+ readonly type: "reasoning";
766
+ readonly id?: string | undefined;
767
+ readonly summary: readonly {
768
+ readonly type: "summary_text";
769
+ readonly text: string;
770
+ }[];
771
+ readonly encrypted_content?: string | null | undefined;
772
+ } | {
773
+ readonly type: "compaction";
774
+ readonly id?: string | null | undefined;
775
+ readonly encrypted_content: string;
776
+ } | {
777
+ readonly type: "message";
778
+ readonly role: "user";
779
+ readonly content: readonly ({
780
+ readonly type: "input_text";
781
+ readonly text: string;
782
+ } | {
783
+ readonly type: "input_video";
784
+ readonly video_url: string;
785
+ } | {
786
+ readonly type: "input_image";
787
+ readonly image_url: string;
788
+ readonly detail?: string | undefined;
789
+ } | {
790
+ readonly type: "input_file";
791
+ readonly filename: string;
792
+ readonly detail?: string | undefined;
793
+ readonly file_data?: string | undefined;
794
+ readonly file_url?: string | undefined;
795
+ })[];
796
+ readonly id?: string | undefined;
797
+ readonly status?: string | undefined;
798
+ } | {
799
+ readonly type: "message";
800
+ readonly id?: string | undefined;
801
+ readonly role: "assistant";
802
+ readonly content: readonly {
803
+ readonly type: "output_text";
804
+ readonly text: string;
805
+ }[];
806
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
807
+ readonly status?: string | undefined;
808
+ } | {
809
+ readonly type: "function_call";
810
+ readonly id?: string | undefined;
811
+ readonly call_id: string;
812
+ readonly name: string;
813
+ readonly namespace?: string | undefined;
814
+ readonly arguments: string;
815
+ } | {
816
+ readonly type: "custom_tool_call";
817
+ readonly id?: string | undefined;
818
+ readonly call_id: string;
819
+ readonly name: string;
820
+ readonly input: string;
821
+ } | {
822
+ readonly [x: string]: unknown;
823
+ readonly type: "web_search_call";
824
+ readonly id: string;
825
+ readonly status?: string | undefined;
826
+ readonly action?: {
827
+ readonly [x: string]: unknown;
828
+ } | null | undefined;
829
+ } | {
830
+ readonly [x: string]: unknown;
831
+ readonly type: "file_search_call";
832
+ readonly id: string;
833
+ readonly status?: string | undefined;
834
+ readonly queries?: readonly string[] | undefined;
835
+ readonly results?: readonly {
836
+ readonly [x: string]: unknown;
837
+ }[] | null | undefined;
838
+ } | {
839
+ readonly [x: string]: unknown;
840
+ readonly type: "code_interpreter_call";
841
+ readonly id: string;
842
+ readonly status?: string | undefined;
843
+ readonly code?: string | null | undefined;
844
+ readonly container_id?: string | null | undefined;
845
+ readonly outputs?: readonly {
846
+ readonly [x: string]: unknown;
847
+ }[] | null | undefined;
848
+ } | {
849
+ readonly [x: string]: unknown;
850
+ readonly type: "mcp_call";
851
+ readonly id: string;
852
+ readonly status?: string | undefined;
853
+ readonly server_label?: string | undefined;
854
+ readonly name?: string | undefined;
855
+ readonly arguments?: string | undefined;
856
+ readonly output?: string | null | undefined;
857
+ readonly error?: unknown;
858
+ } | {
859
+ readonly [x: string]: unknown;
860
+ readonly type: string;
861
+ readonly id: string;
862
+ })[];
863
+ readonly instructions?: string | undefined;
864
+ readonly tools?: readonly ({
865
+ readonly type: "custom";
866
+ readonly name: string;
867
+ readonly description: string;
868
+ readonly format: {
869
+ readonly type: "text";
870
+ } | {
871
+ readonly type: "grammar";
872
+ readonly syntax: "lark" | "regex";
873
+ readonly definition: string;
874
+ };
875
+ } | {
876
+ readonly type: "function";
877
+ readonly name: string;
878
+ readonly description: string;
879
+ readonly parameters: {
880
+ readonly [x: string]: unknown;
881
+ };
882
+ readonly strict?: boolean | undefined;
883
+ } | {
884
+ readonly [x: string]: unknown;
885
+ readonly type: string;
886
+ })[] | undefined;
887
+ readonly tool_choice?: "auto" | "none" | "required" | {
888
+ readonly type: "custom" | "function";
889
+ readonly name: string;
890
+ } | {
891
+ readonly type: "allowed_tools";
892
+ readonly mode: "auto" | "none" | "required";
893
+ readonly tools: readonly {
894
+ readonly type: "custom" | "function";
895
+ readonly name: string;
896
+ }[];
897
+ } | undefined;
898
+ readonly store?: boolean | undefined;
899
+ readonly metadata?: {
900
+ readonly [x: string]: string;
901
+ } | undefined;
902
+ readonly safety_identifier?: string | undefined;
903
+ readonly stream_options?: {
904
+ readonly include_obfuscation?: boolean | undefined;
905
+ } | undefined;
906
+ readonly top_logprobs?: number | undefined;
907
+ readonly truncation?: "auto" | "disabled" | undefined;
908
+ readonly service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
909
+ readonly prompt_cache_key?: string | undefined;
910
+ readonly include?: readonly OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
911
+ readonly reasoning?: {
912
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
913
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
914
+ } | undefined;
915
+ readonly text?: {
916
+ readonly verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
917
+ } | undefined;
918
+ readonly max_output_tokens?: number | undefined;
919
+ readonly max_tool_calls?: number | undefined;
920
+ readonly parallel_tool_calls?: boolean | undefined;
921
+ readonly temperature?: number | undefined;
922
+ readonly top_p?: number | undefined;
923
+ readonly presence_penalty?: number | undefined;
924
+ readonly frequency_penalty?: number | undefined;
925
+ readonly stream: true;
926
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
729
927
  model: string;
730
928
  messages: readonly ({
731
929
  readonly role: "system";
@@ -916,10 +1114,11 @@ export declare const routes: Route<{
916
1114
  } | undefined;
917
1115
  user?: string | undefined;
918
1116
  reasoning?: Record<string, unknown> | undefined;
919
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
1117
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
920
1118
  export declare const configure: (input?: Config) => {
921
1119
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
922
1120
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
1121
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
923
1122
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
924
1123
  decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
925
1124
  configure: typeof configure;
@@ -927,13 +1126,16 @@ export declare const configure: (input?: Config) => {
927
1126
  export declare const provider: {
928
1127
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
929
1128
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
1129
+ responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
930
1130
  image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
931
1131
  decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
932
1132
  configure: typeof configure;
933
1133
  };
934
1134
  export declare const decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
935
1135
  export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
1136
+ export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./open-responses-options.js").OpenResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
936
1137
  export declare const model: ProviderPackage.Model<Settings, OpenRouterProviderOptionsInput>;
1138
+ export declare const responsesModel: ProviderPackage.Model<Settings<OpenResponsesProviderOptionsInput>, OpenResponsesProviderOptionsInput>;
937
1139
  export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
938
1140
  export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
939
- export {};
1141
+ export * as OpenRouter from "./openrouter.js";