@soat/sdk 0.4.9 → 0.4.11

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/esm/index.js CHANGED
@@ -1394,7 +1394,7 @@ var Chats = class {
1394
1394
  /**
1395
1395
  * Create a chat completion (stateless)
1396
1396
  *
1397
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `aiProviderId`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. Falls back to Ollama when `aiProviderId` is omitted.
1397
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required there is no server-side model fallback.
1398
1398
  *
1399
1399
  */
1400
1400
  static createChatCompletion(options) {
package/dist/index.d.cts CHANGED
@@ -766,12 +766,11 @@ type ChatMessage = {
766
766
  };
767
767
  type ChatCompletionRequest = {
768
768
  /**
769
- * Public ID of the AI provider to use. When omitted the server falls back to Ollama.
770
- *
769
+ * Public ID of the AI provider to use.
771
770
  */
772
- ai_provider_id?: string;
771
+ ai_provider_id: string;
773
772
  /**
774
- * Model identifier. Overrides the provider's `defaultModel` when specified.
773
+ * Model identifier. Overrides the provider's `default_model` when specified.
775
774
  *
776
775
  */
777
776
  model?: string;
@@ -835,9 +834,17 @@ type ConversationMessageRecord = {
835
834
  */
836
835
  document_id?: string;
837
836
  /**
838
- * Actor ID who sent this message
837
+ * Role of the message sender
839
838
  */
840
- actor_id?: string;
839
+ role?: 'user' | 'assistant' | 'system';
840
+ /**
841
+ * Optional actor ID associated with this message
842
+ */
843
+ actor_id?: string | null;
844
+ /**
845
+ * Optional agent ID that generated this message (set for assistant messages produced by generate)
846
+ */
847
+ agent_id?: string | null;
841
848
  /**
842
849
  * Zero-based position in the conversation
843
850
  */
@@ -2678,7 +2685,7 @@ type CreateChatCompletionData = {
2678
2685
  };
2679
2686
  type CreateChatCompletionErrors = {
2680
2687
  /**
2681
- * Bad Request — `messages` is missing or empty
2688
+ * Bad Request — `messages` is missing or empty, or `ai_provider_id` is missing
2682
2689
  */
2683
2690
  400: ErrorResponse;
2684
2691
  /**
@@ -3004,9 +3011,13 @@ type AddConversationMessageData = {
3004
3011
  */
3005
3012
  message: string;
3006
3013
  /**
3007
- * Actor ID who is sending this message
3014
+ * Role of the message sender
3008
3015
  */
3009
- actor_id: string;
3016
+ role: 'user' | 'assistant' | 'system';
3017
+ /**
3018
+ * Optional actor ID to associate with this message (user identity)
3019
+ */
3020
+ actor_id?: string | null;
3010
3021
  /**
3011
3022
  * Zero-based position. Defaults to MAX+1 (append).
3012
3023
  */
@@ -3056,11 +3067,11 @@ type AddConversationMessageResponse = AddConversationMessageResponses[keyof AddC
3056
3067
  type GenerateConversationMessageData = {
3057
3068
  body: {
3058
3069
  /**
3059
- * ID of the actor that will produce the next message. Must have `agentId` or `chatId` set.
3070
+ * ID of the agent that will produce the next message.
3060
3071
  */
3061
- actor_id: string;
3072
+ agent_id: string;
3062
3073
  /**
3063
- * Optional model override. Only honored for chat-backed actors.
3074
+ * Optional model override.
3064
3075
  */
3065
3076
  model?: string;
3066
3077
  /**
@@ -5789,7 +5800,7 @@ declare class Chats {
5789
5800
  /**
5790
5801
  * Create a chat completion (stateless)
5791
5802
  *
5792
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `aiProviderId`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. Falls back to Ollama when `aiProviderId` is omitted.
5803
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required there is no server-side model fallback.
5793
5804
  *
5794
5805
  */
5795
5806
  static createChatCompletion<ThrowOnError extends boolean = false>(options: Options<CreateChatCompletionData, ThrowOnError>): RequestResult<CreateChatCompletionResponses, CreateChatCompletionErrors, ThrowOnError, "fields">;
package/dist/index.d.ts CHANGED
@@ -766,12 +766,11 @@ type ChatMessage = {
766
766
  };
767
767
  type ChatCompletionRequest = {
768
768
  /**
769
- * Public ID of the AI provider to use. When omitted the server falls back to Ollama.
770
- *
769
+ * Public ID of the AI provider to use.
771
770
  */
772
- ai_provider_id?: string;
771
+ ai_provider_id: string;
773
772
  /**
774
- * Model identifier. Overrides the provider's `defaultModel` when specified.
773
+ * Model identifier. Overrides the provider's `default_model` when specified.
775
774
  *
776
775
  */
777
776
  model?: string;
@@ -835,9 +834,17 @@ type ConversationMessageRecord = {
835
834
  */
836
835
  document_id?: string;
837
836
  /**
838
- * Actor ID who sent this message
837
+ * Role of the message sender
839
838
  */
840
- actor_id?: string;
839
+ role?: 'user' | 'assistant' | 'system';
840
+ /**
841
+ * Optional actor ID associated with this message
842
+ */
843
+ actor_id?: string | null;
844
+ /**
845
+ * Optional agent ID that generated this message (set for assistant messages produced by generate)
846
+ */
847
+ agent_id?: string | null;
841
848
  /**
842
849
  * Zero-based position in the conversation
843
850
  */
@@ -2678,7 +2685,7 @@ type CreateChatCompletionData = {
2678
2685
  };
2679
2686
  type CreateChatCompletionErrors = {
2680
2687
  /**
2681
- * Bad Request — `messages` is missing or empty
2688
+ * Bad Request — `messages` is missing or empty, or `ai_provider_id` is missing
2682
2689
  */
2683
2690
  400: ErrorResponse;
2684
2691
  /**
@@ -3004,9 +3011,13 @@ type AddConversationMessageData = {
3004
3011
  */
3005
3012
  message: string;
3006
3013
  /**
3007
- * Actor ID who is sending this message
3014
+ * Role of the message sender
3008
3015
  */
3009
- actor_id: string;
3016
+ role: 'user' | 'assistant' | 'system';
3017
+ /**
3018
+ * Optional actor ID to associate with this message (user identity)
3019
+ */
3020
+ actor_id?: string | null;
3010
3021
  /**
3011
3022
  * Zero-based position. Defaults to MAX+1 (append).
3012
3023
  */
@@ -3056,11 +3067,11 @@ type AddConversationMessageResponse = AddConversationMessageResponses[keyof AddC
3056
3067
  type GenerateConversationMessageData = {
3057
3068
  body: {
3058
3069
  /**
3059
- * ID of the actor that will produce the next message. Must have `agentId` or `chatId` set.
3070
+ * ID of the agent that will produce the next message.
3060
3071
  */
3061
- actor_id: string;
3072
+ agent_id: string;
3062
3073
  /**
3063
- * Optional model override. Only honored for chat-backed actors.
3074
+ * Optional model override.
3064
3075
  */
3065
3076
  model?: string;
3066
3077
  /**
@@ -5789,7 +5800,7 @@ declare class Chats {
5789
5800
  /**
5790
5801
  * Create a chat completion (stateless)
5791
5802
  *
5792
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `aiProviderId`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. Falls back to Ollama when `aiProviderId` is omitted.
5803
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required there is no server-side model fallback.
5793
5804
  *
5794
5805
  */
5795
5806
  static createChatCompletion<ThrowOnError extends boolean = false>(options: Options<CreateChatCompletionData, ThrowOnError>): RequestResult<CreateChatCompletionResponses, CreateChatCompletionErrors, ThrowOnError, "fields">;
package/dist/index.js CHANGED
@@ -1442,7 +1442,7 @@ var Chats = class {
1442
1442
  /**
1443
1443
  * Create a chat completion (stateless)
1444
1444
  *
1445
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `aiProviderId`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. Falls back to Ollama when `aiProviderId` is omitted.
1445
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required there is no server-side model fallback.
1446
1446
  *
1447
1447
  */
1448
1448
  static createChatCompletion(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",