@opencode-ai/sdk 1.4.0 → 1.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.
@@ -1020,6 +1020,29 @@ export type ProviderConfig = {
1020
1020
  env?: Array<string>;
1021
1021
  id?: string;
1022
1022
  npm?: string;
1023
+ whitelist?: Array<string>;
1024
+ blacklist?: Array<string>;
1025
+ options?: {
1026
+ apiKey?: string;
1027
+ baseURL?: string;
1028
+ /**
1029
+ * GitHub Enterprise URL for copilot authentication
1030
+ */
1031
+ enterpriseUrl?: string;
1032
+ /**
1033
+ * Enable promptCacheKey for this provider (default false)
1034
+ */
1035
+ setCacheKey?: boolean;
1036
+ /**
1037
+ * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
1038
+ */
1039
+ timeout?: number | false;
1040
+ /**
1041
+ * Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.
1042
+ */
1043
+ chunkTimeout?: number;
1044
+ [key: string]: unknown | string | boolean | number | false | number | undefined;
1045
+ };
1023
1046
  models?: {
1024
1047
  [key: string]: {
1025
1048
  id?: string;
@@ -1056,16 +1079,16 @@ export type ProviderConfig = {
1056
1079
  };
1057
1080
  experimental?: boolean;
1058
1081
  status?: "alpha" | "beta" | "deprecated";
1082
+ provider?: {
1083
+ npm?: string;
1084
+ api?: string;
1085
+ };
1059
1086
  options?: {
1060
1087
  [key: string]: unknown;
1061
1088
  };
1062
1089
  headers?: {
1063
1090
  [key: string]: string;
1064
1091
  };
1065
- provider?: {
1066
- npm?: string;
1067
- api?: string;
1068
- };
1069
1092
  /**
1070
1093
  * Variant-specific configuration
1071
1094
  */
@@ -1080,29 +1103,6 @@ export type ProviderConfig = {
1080
1103
  };
1081
1104
  };
1082
1105
  };
1083
- whitelist?: Array<string>;
1084
- blacklist?: Array<string>;
1085
- options?: {
1086
- apiKey?: string;
1087
- baseURL?: string;
1088
- /**
1089
- * GitHub Enterprise URL for copilot authentication
1090
- */
1091
- enterpriseUrl?: string;
1092
- /**
1093
- * Enable promptCacheKey for this provider (default false)
1094
- */
1095
- setCacheKey?: boolean;
1096
- /**
1097
- * Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.
1098
- */
1099
- timeout?: number | false;
1100
- /**
1101
- * Timeout in milliseconds between streamed SSE chunks for this provider. If no chunk arrives within this window, the request is aborted.
1102
- */
1103
- chunkTimeout?: number;
1104
- [key: string]: unknown | string | boolean | number | false | number | undefined;
1105
- };
1106
1106
  };
1107
1107
  export type McpLocalConfig = {
1108
1108
  /**
@@ -3362,7 +3362,10 @@ export type SessionShellResponses = {
3362
3362
  /**
3363
3363
  * Created message
3364
3364
  */
3365
- 200: AssistantMessage;
3365
+ 200: {
3366
+ info: Message;
3367
+ parts: Array<Part>;
3368
+ };
3366
3369
  };
3367
3370
  export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses];
3368
3371
  export type SessionRevertData = {
@@ -3599,66 +3602,7 @@ export type ProviderListResponses = {
3599
3602
  * List of providers
3600
3603
  */
3601
3604
  200: {
3602
- all: Array<{
3603
- api?: string;
3604
- name: string;
3605
- env: Array<string>;
3606
- id: string;
3607
- npm?: string;
3608
- models: {
3609
- [key: string]: {
3610
- id: string;
3611
- name: string;
3612
- family?: string;
3613
- release_date: string;
3614
- attachment: boolean;
3615
- reasoning: boolean;
3616
- temperature: boolean;
3617
- tool_call: boolean;
3618
- interleaved?: true | {
3619
- field: "reasoning_content" | "reasoning_details";
3620
- };
3621
- cost?: {
3622
- input: number;
3623
- output: number;
3624
- cache_read?: number;
3625
- cache_write?: number;
3626
- context_over_200k?: {
3627
- input: number;
3628
- output: number;
3629
- cache_read?: number;
3630
- cache_write?: number;
3631
- };
3632
- };
3633
- limit: {
3634
- context: number;
3635
- input?: number;
3636
- output: number;
3637
- };
3638
- modalities?: {
3639
- input: Array<"text" | "audio" | "image" | "video" | "pdf">;
3640
- output: Array<"text" | "audio" | "image" | "video" | "pdf">;
3641
- };
3642
- experimental?: boolean;
3643
- status?: "alpha" | "beta" | "deprecated";
3644
- options: {
3645
- [key: string]: unknown;
3646
- };
3647
- headers?: {
3648
- [key: string]: string;
3649
- };
3650
- provider?: {
3651
- npm?: string;
3652
- api?: string;
3653
- };
3654
- variants?: {
3655
- [key: string]: {
3656
- [key: string]: unknown;
3657
- };
3658
- };
3659
- };
3660
- };
3661
- }>;
3605
+ all: Array<Provider>;
3662
3606
  default: {
3663
3607
  [key: string]: string;
3664
3608
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {