@reverbia/sdk 1.0.0-next.20251219162520 → 1.0.0-next.20251219170400

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.
@@ -172,6 +172,10 @@ type LlmapiMessage = {
172
172
  */
173
173
  content?: Array<LlmapiMessageContentPart>;
174
174
  role?: LlmapiRole;
175
+ /**
176
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
177
+ */
178
+ tool_calls?: Array<LlmapiToolCall>;
175
179
  };
176
180
  /**
177
181
  * ImageURL is used when Type=image_url
@@ -298,6 +302,30 @@ type LlmapiModelTopProvider = {
298
302
  * Role is the message role (system, user, assistant)
299
303
  */
300
304
  type LlmapiRole = string;
305
+ type LlmapiToolCall = {
306
+ function?: LlmapiToolCallFunction;
307
+ /**
308
+ * ID is the unique identifier for this tool call
309
+ */
310
+ id?: string;
311
+ /**
312
+ * Type is the type of tool call (always "function" for now)
313
+ */
314
+ type?: string;
315
+ };
316
+ /**
317
+ * Function contains the function call details
318
+ */
319
+ type LlmapiToolCallFunction = {
320
+ /**
321
+ * Arguments is the JSON string of arguments to pass to the function
322
+ */
323
+ arguments?: string;
324
+ /**
325
+ * Name is the name of the function to call
326
+ */
327
+ name?: string;
328
+ };
301
329
 
302
330
  /**
303
331
  * Base arguments for sending a message
@@ -172,6 +172,10 @@ type LlmapiMessage = {
172
172
  */
173
173
  content?: Array<LlmapiMessageContentPart>;
174
174
  role?: LlmapiRole;
175
+ /**
176
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
177
+ */
178
+ tool_calls?: Array<LlmapiToolCall>;
175
179
  };
176
180
  /**
177
181
  * ImageURL is used when Type=image_url
@@ -298,6 +302,30 @@ type LlmapiModelTopProvider = {
298
302
  * Role is the message role (system, user, assistant)
299
303
  */
300
304
  type LlmapiRole = string;
305
+ type LlmapiToolCall = {
306
+ function?: LlmapiToolCallFunction;
307
+ /**
308
+ * ID is the unique identifier for this tool call
309
+ */
310
+ id?: string;
311
+ /**
312
+ * Type is the type of tool call (always "function" for now)
313
+ */
314
+ type?: string;
315
+ };
316
+ /**
317
+ * Function contains the function call details
318
+ */
319
+ type LlmapiToolCallFunction = {
320
+ /**
321
+ * Arguments is the JSON string of arguments to pass to the function
322
+ */
323
+ arguments?: string;
324
+ /**
325
+ * Name is the name of the function to call
326
+ */
327
+ name?: string;
328
+ };
301
329
 
302
330
  /**
303
331
  * Base arguments for sending a message
package/dist/index.cjs CHANGED
@@ -26,6 +26,7 @@ __export(index_exports, {
26
26
  postApiV1ChatCompletions: () => postApiV1ChatCompletions,
27
27
  postApiV1Embeddings: () => postApiV1Embeddings,
28
28
  postApiV1ImagesGenerations: () => postApiV1ImagesGenerations,
29
+ postApiV1Responses: () => postApiV1Responses,
29
30
  postApiV1Search: () => postApiV1Search,
30
31
  postAuthOauthByProviderExchange: () => postAuthOauthByProviderExchange,
31
32
  postAuthOauthByProviderRefresh: () => postAuthOauthByProviderRefresh,
@@ -891,6 +892,16 @@ var getApiV1Models = (options) => {
891
892
  ...options
892
893
  });
893
894
  };
895
+ var postApiV1Responses = (options) => {
896
+ return (options.client ?? client).post({
897
+ url: "/api/v1/responses",
898
+ ...options,
899
+ headers: {
900
+ "Content-Type": "application/json",
901
+ ...options.headers
902
+ }
903
+ });
904
+ };
894
905
  var postApiV1Search = (options) => {
895
906
  return (options.client ?? client).post({
896
907
  url: "/api/v1/search",
@@ -945,6 +956,7 @@ var getHealth = (options) => {
945
956
  postApiV1ChatCompletions,
946
957
  postApiV1Embeddings,
947
958
  postApiV1ImagesGenerations,
959
+ postApiV1Responses,
948
960
  postApiV1Search,
949
961
  postAuthOauthByProviderExchange,
950
962
  postAuthOauthByProviderRefresh,
package/dist/index.d.mts CHANGED
@@ -319,6 +319,10 @@ type LlmapiMessage = {
319
319
  */
320
320
  content?: Array<LlmapiMessageContentPart>;
321
321
  role?: LlmapiRole;
322
+ /**
323
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
324
+ */
325
+ tool_calls?: Array<LlmapiToolCall>;
322
326
  };
323
327
  /**
324
328
  * ImageURL is used when Type=image_url
@@ -469,6 +473,162 @@ type LlmapiModelsListResponse = {
469
473
  */
470
474
  next_page_token?: string;
471
475
  };
476
+ /**
477
+ * ExtraFields contains additional metadata
478
+ */
479
+ type LlmapiResponseExtraFields = {
480
+ /**
481
+ * Latency is the request latency in milliseconds
482
+ */
483
+ latency?: number;
484
+ /**
485
+ * ModelRequested is the model that was requested
486
+ */
487
+ model_requested?: string;
488
+ /**
489
+ * Provider is the LLM provider used (e.g., "openai", "anthropic")
490
+ */
491
+ provider?: string;
492
+ /**
493
+ * RequestType is always "responses"
494
+ */
495
+ request_type?: string;
496
+ };
497
+ type LlmapiResponseOutputContent = {
498
+ /**
499
+ * Text is the text content
500
+ */
501
+ text?: string;
502
+ /**
503
+ * Type is the content type (e.g., "output_text")
504
+ */
505
+ type?: string;
506
+ };
507
+ type LlmapiResponseOutputItem = {
508
+ /**
509
+ * Arguments is the function arguments for function_call types
510
+ */
511
+ arguments?: string;
512
+ /**
513
+ * CallID is the call ID for function_call types
514
+ */
515
+ call_id?: string;
516
+ /**
517
+ * Content is the content array for message types
518
+ */
519
+ content?: Array<LlmapiResponseOutputContent>;
520
+ /**
521
+ * ID is the unique identifier for this output item
522
+ */
523
+ id?: string;
524
+ /**
525
+ * Name is the function name for function_call types
526
+ */
527
+ name?: string;
528
+ /**
529
+ * Role is the role for message types (e.g., "assistant")
530
+ */
531
+ role?: string;
532
+ /**
533
+ * Status is the status of this output item (e.g., "completed")
534
+ */
535
+ status?: string;
536
+ /**
537
+ * Type is the output item type (e.g., "message", "function_call")
538
+ */
539
+ type?: string;
540
+ };
541
+ type LlmapiResponseRequest = {
542
+ /**
543
+ * Background indicates if request should be processed in background
544
+ */
545
+ background?: boolean;
546
+ /**
547
+ * Conversation is the conversation ID (optional)
548
+ */
549
+ conversation?: string;
550
+ /**
551
+ * Input is the simple text input for the response
552
+ */
553
+ input: string;
554
+ /**
555
+ * MaxOutputTokens is the maximum number of tokens to generate
556
+ */
557
+ max_output_tokens?: number;
558
+ /**
559
+ * Model is the model identifier in 'provider/model' format
560
+ */
561
+ model: string;
562
+ /**
563
+ * PreviousResponseID is the ID of a previous response to continue from
564
+ */
565
+ previous_response_id?: string;
566
+ /**
567
+ * Store indicates if the response should be stored
568
+ */
569
+ store?: boolean;
570
+ /**
571
+ * Stream indicates if response should be streamed
572
+ */
573
+ stream?: boolean;
574
+ /**
575
+ * Temperature controls randomness (0.0 to 2.0)
576
+ */
577
+ temperature?: number;
578
+ /**
579
+ * ToolChoice controls which tool to use (auto, any, none, required, or tool name)
580
+ */
581
+ tool_choice?: string;
582
+ /**
583
+ * Tools is an array of tool definitions (passed through, no MCP loop)
584
+ */
585
+ tools?: Array<LlmapiTool>;
586
+ };
587
+ type LlmapiResponseResponse = {
588
+ /**
589
+ * Created is the Unix timestamp of creation (created_at in OpenAI format)
590
+ */
591
+ created_at?: number;
592
+ extra_fields?: LlmapiResponseExtraFields;
593
+ /**
594
+ * ID is the unique response identifier
595
+ */
596
+ id?: string;
597
+ /**
598
+ * Model is the model used for generation
599
+ */
600
+ model?: string;
601
+ /**
602
+ * Object is the response type (e.g., "response")
603
+ */
604
+ object?: string;
605
+ /**
606
+ * Output is the array of output items (OpenAI Responses API format)
607
+ */
608
+ output?: Array<LlmapiResponseOutputItem>;
609
+ usage?: LlmapiResponseUsage;
610
+ };
611
+ /**
612
+ * Usage contains token usage information
613
+ */
614
+ type LlmapiResponseUsage = {
615
+ /**
616
+ * CompletionTokens is the number of tokens in the completion
617
+ */
618
+ completion_tokens?: number;
619
+ /**
620
+ * CostMicroUSD is the cost of this response in micro-dollars (USD × 1,000,000)
621
+ */
622
+ cost_micro_usd?: number;
623
+ /**
624
+ * PromptTokens is the number of tokens in the prompt
625
+ */
626
+ prompt_tokens?: number;
627
+ /**
628
+ * TotalTokens is the total number of tokens used
629
+ */
630
+ total_tokens?: number;
631
+ };
472
632
  /**
473
633
  * Role is the message role (system, user, assistant)
474
634
  */
@@ -547,6 +707,52 @@ type LlmapiSearchUsage = {
547
707
  */
548
708
  cost_micro_usd?: number;
549
709
  };
710
+ type LlmapiTool = {
711
+ function?: LlmapiToolFunction;
712
+ /**
713
+ * Type is the tool type (function, code_interpreter, file_search, web_search)
714
+ */
715
+ type?: string;
716
+ };
717
+ type LlmapiToolCall = {
718
+ function?: LlmapiToolCallFunction;
719
+ /**
720
+ * ID is the unique identifier for this tool call
721
+ */
722
+ id?: string;
723
+ /**
724
+ * Type is the type of tool call (always "function" for now)
725
+ */
726
+ type?: string;
727
+ };
728
+ /**
729
+ * Function contains the function call details
730
+ */
731
+ type LlmapiToolCallFunction = {
732
+ /**
733
+ * Arguments is the JSON string of arguments to pass to the function
734
+ */
735
+ arguments?: string;
736
+ /**
737
+ * Name is the name of the function to call
738
+ */
739
+ name?: string;
740
+ };
741
+ /**
742
+ * Function is the function definition (when Type is "function")
743
+ */
744
+ type LlmapiToolFunction = {
745
+ /**
746
+ * Arguments is the function arguments schema (JSON object)
747
+ */
748
+ arguments?: {
749
+ [key: string]: unknown;
750
+ };
751
+ /**
752
+ * Name is the function name
753
+ */
754
+ name?: string;
755
+ };
550
756
  type ResponseErrorResponse = {
551
757
  error?: string;
552
758
  };
@@ -687,6 +893,33 @@ type GetApiV1ModelsResponses = {
687
893
  200: LlmapiModelsListResponse;
688
894
  };
689
895
  type GetApiV1ModelsResponse = GetApiV1ModelsResponses[keyof GetApiV1ModelsResponses];
896
+ type PostApiV1ResponsesData = {
897
+ /**
898
+ * Response request
899
+ */
900
+ body: LlmapiResponseRequest;
901
+ path?: never;
902
+ query?: never;
903
+ url: '/api/v1/responses';
904
+ };
905
+ type PostApiV1ResponsesErrors = {
906
+ /**
907
+ * Bad Request
908
+ */
909
+ 400: ResponseErrorResponse;
910
+ /**
911
+ * Internal Server Error
912
+ */
913
+ 500: ResponseErrorResponse;
914
+ };
915
+ type PostApiV1ResponsesError = PostApiV1ResponsesErrors[keyof PostApiV1ResponsesErrors];
916
+ type PostApiV1ResponsesResponses = {
917
+ /**
918
+ * OK
919
+ */
920
+ 200: LlmapiResponseResponse | string;
921
+ };
922
+ type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostApiV1ResponsesResponses];
690
923
  type PostApiV1SearchData = {
691
924
  /**
692
925
  * Search request
@@ -721,7 +954,7 @@ type PostAuthOauthByProviderExchangeData = {
721
954
  body: HandlersExchangeRequest;
722
955
  path: {
723
956
  /**
724
- * OAuth provider (google-drive)
957
+ * OAuth provider (google-drive, dropbox)
725
958
  */
726
959
  provider: string;
727
960
  };
@@ -753,7 +986,7 @@ type PostAuthOauthByProviderRefreshData = {
753
986
  body: HandlersRefreshRequest;
754
987
  path: {
755
988
  /**
756
- * OAuth provider (google-drive)
989
+ * OAuth provider (google-drive, dropbox)
757
990
  */
758
991
  provider: string;
759
992
  };
@@ -785,7 +1018,7 @@ type PostAuthOauthByProviderRevokeData = {
785
1018
  body: HandlersRevokeRequest;
786
1019
  path: {
787
1020
  /**
788
- * OAuth provider (google-drive)
1021
+ * OAuth provider (google-drive, dropbox)
789
1022
  */
790
1023
  provider: string;
791
1024
  };
@@ -1165,6 +1398,12 @@ declare const postApiV1ImagesGenerations: <ThrowOnError extends boolean = false>
1165
1398
  * Returns a list of all available models from the configured gateway with optional filters. Models include modality information indicating their capabilities (e.g., llm, embedding, vision, image, audio, reasoning, code, reranker, multimodal, video).
1166
1399
  */
1167
1400
  declare const getApiV1Models: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>) => RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>;
1401
+ /**
1402
+ * Create response
1403
+ *
1404
+ * Generates a response using the Responses API format. Supports streaming when stream=true.
1405
+ */
1406
+ declare const postApiV1Responses: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>) => RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>;
1168
1407
  /**
1169
1408
  * Create search
1170
1409
  *
@@ -1196,4 +1435,4 @@ declare const postAuthOauthByProviderRevoke: <ThrowOnError extends boolean = fal
1196
1435
  */
1197
1436
  declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
1198
1437
 
1199
- export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
1438
+ export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiResponseExtraFields, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseUsage, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type LlmapiTool, type LlmapiToolCall, type LlmapiToolCallFunction, type LlmapiToolFunction, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Responses, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
package/dist/index.d.ts CHANGED
@@ -319,6 +319,10 @@ type LlmapiMessage = {
319
319
  */
320
320
  content?: Array<LlmapiMessageContentPart>;
321
321
  role?: LlmapiRole;
322
+ /**
323
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
324
+ */
325
+ tool_calls?: Array<LlmapiToolCall>;
322
326
  };
323
327
  /**
324
328
  * ImageURL is used when Type=image_url
@@ -469,6 +473,162 @@ type LlmapiModelsListResponse = {
469
473
  */
470
474
  next_page_token?: string;
471
475
  };
476
+ /**
477
+ * ExtraFields contains additional metadata
478
+ */
479
+ type LlmapiResponseExtraFields = {
480
+ /**
481
+ * Latency is the request latency in milliseconds
482
+ */
483
+ latency?: number;
484
+ /**
485
+ * ModelRequested is the model that was requested
486
+ */
487
+ model_requested?: string;
488
+ /**
489
+ * Provider is the LLM provider used (e.g., "openai", "anthropic")
490
+ */
491
+ provider?: string;
492
+ /**
493
+ * RequestType is always "responses"
494
+ */
495
+ request_type?: string;
496
+ };
497
+ type LlmapiResponseOutputContent = {
498
+ /**
499
+ * Text is the text content
500
+ */
501
+ text?: string;
502
+ /**
503
+ * Type is the content type (e.g., "output_text")
504
+ */
505
+ type?: string;
506
+ };
507
+ type LlmapiResponseOutputItem = {
508
+ /**
509
+ * Arguments is the function arguments for function_call types
510
+ */
511
+ arguments?: string;
512
+ /**
513
+ * CallID is the call ID for function_call types
514
+ */
515
+ call_id?: string;
516
+ /**
517
+ * Content is the content array for message types
518
+ */
519
+ content?: Array<LlmapiResponseOutputContent>;
520
+ /**
521
+ * ID is the unique identifier for this output item
522
+ */
523
+ id?: string;
524
+ /**
525
+ * Name is the function name for function_call types
526
+ */
527
+ name?: string;
528
+ /**
529
+ * Role is the role for message types (e.g., "assistant")
530
+ */
531
+ role?: string;
532
+ /**
533
+ * Status is the status of this output item (e.g., "completed")
534
+ */
535
+ status?: string;
536
+ /**
537
+ * Type is the output item type (e.g., "message", "function_call")
538
+ */
539
+ type?: string;
540
+ };
541
+ type LlmapiResponseRequest = {
542
+ /**
543
+ * Background indicates if request should be processed in background
544
+ */
545
+ background?: boolean;
546
+ /**
547
+ * Conversation is the conversation ID (optional)
548
+ */
549
+ conversation?: string;
550
+ /**
551
+ * Input is the simple text input for the response
552
+ */
553
+ input: string;
554
+ /**
555
+ * MaxOutputTokens is the maximum number of tokens to generate
556
+ */
557
+ max_output_tokens?: number;
558
+ /**
559
+ * Model is the model identifier in 'provider/model' format
560
+ */
561
+ model: string;
562
+ /**
563
+ * PreviousResponseID is the ID of a previous response to continue from
564
+ */
565
+ previous_response_id?: string;
566
+ /**
567
+ * Store indicates if the response should be stored
568
+ */
569
+ store?: boolean;
570
+ /**
571
+ * Stream indicates if response should be streamed
572
+ */
573
+ stream?: boolean;
574
+ /**
575
+ * Temperature controls randomness (0.0 to 2.0)
576
+ */
577
+ temperature?: number;
578
+ /**
579
+ * ToolChoice controls which tool to use (auto, any, none, required, or tool name)
580
+ */
581
+ tool_choice?: string;
582
+ /**
583
+ * Tools is an array of tool definitions (passed through, no MCP loop)
584
+ */
585
+ tools?: Array<LlmapiTool>;
586
+ };
587
+ type LlmapiResponseResponse = {
588
+ /**
589
+ * Created is the Unix timestamp of creation (created_at in OpenAI format)
590
+ */
591
+ created_at?: number;
592
+ extra_fields?: LlmapiResponseExtraFields;
593
+ /**
594
+ * ID is the unique response identifier
595
+ */
596
+ id?: string;
597
+ /**
598
+ * Model is the model used for generation
599
+ */
600
+ model?: string;
601
+ /**
602
+ * Object is the response type (e.g., "response")
603
+ */
604
+ object?: string;
605
+ /**
606
+ * Output is the array of output items (OpenAI Responses API format)
607
+ */
608
+ output?: Array<LlmapiResponseOutputItem>;
609
+ usage?: LlmapiResponseUsage;
610
+ };
611
+ /**
612
+ * Usage contains token usage information
613
+ */
614
+ type LlmapiResponseUsage = {
615
+ /**
616
+ * CompletionTokens is the number of tokens in the completion
617
+ */
618
+ completion_tokens?: number;
619
+ /**
620
+ * CostMicroUSD is the cost of this response in micro-dollars (USD × 1,000,000)
621
+ */
622
+ cost_micro_usd?: number;
623
+ /**
624
+ * PromptTokens is the number of tokens in the prompt
625
+ */
626
+ prompt_tokens?: number;
627
+ /**
628
+ * TotalTokens is the total number of tokens used
629
+ */
630
+ total_tokens?: number;
631
+ };
472
632
  /**
473
633
  * Role is the message role (system, user, assistant)
474
634
  */
@@ -547,6 +707,52 @@ type LlmapiSearchUsage = {
547
707
  */
548
708
  cost_micro_usd?: number;
549
709
  };
710
+ type LlmapiTool = {
711
+ function?: LlmapiToolFunction;
712
+ /**
713
+ * Type is the tool type (function, code_interpreter, file_search, web_search)
714
+ */
715
+ type?: string;
716
+ };
717
+ type LlmapiToolCall = {
718
+ function?: LlmapiToolCallFunction;
719
+ /**
720
+ * ID is the unique identifier for this tool call
721
+ */
722
+ id?: string;
723
+ /**
724
+ * Type is the type of tool call (always "function" for now)
725
+ */
726
+ type?: string;
727
+ };
728
+ /**
729
+ * Function contains the function call details
730
+ */
731
+ type LlmapiToolCallFunction = {
732
+ /**
733
+ * Arguments is the JSON string of arguments to pass to the function
734
+ */
735
+ arguments?: string;
736
+ /**
737
+ * Name is the name of the function to call
738
+ */
739
+ name?: string;
740
+ };
741
+ /**
742
+ * Function is the function definition (when Type is "function")
743
+ */
744
+ type LlmapiToolFunction = {
745
+ /**
746
+ * Arguments is the function arguments schema (JSON object)
747
+ */
748
+ arguments?: {
749
+ [key: string]: unknown;
750
+ };
751
+ /**
752
+ * Name is the function name
753
+ */
754
+ name?: string;
755
+ };
550
756
  type ResponseErrorResponse = {
551
757
  error?: string;
552
758
  };
@@ -687,6 +893,33 @@ type GetApiV1ModelsResponses = {
687
893
  200: LlmapiModelsListResponse;
688
894
  };
689
895
  type GetApiV1ModelsResponse = GetApiV1ModelsResponses[keyof GetApiV1ModelsResponses];
896
+ type PostApiV1ResponsesData = {
897
+ /**
898
+ * Response request
899
+ */
900
+ body: LlmapiResponseRequest;
901
+ path?: never;
902
+ query?: never;
903
+ url: '/api/v1/responses';
904
+ };
905
+ type PostApiV1ResponsesErrors = {
906
+ /**
907
+ * Bad Request
908
+ */
909
+ 400: ResponseErrorResponse;
910
+ /**
911
+ * Internal Server Error
912
+ */
913
+ 500: ResponseErrorResponse;
914
+ };
915
+ type PostApiV1ResponsesError = PostApiV1ResponsesErrors[keyof PostApiV1ResponsesErrors];
916
+ type PostApiV1ResponsesResponses = {
917
+ /**
918
+ * OK
919
+ */
920
+ 200: LlmapiResponseResponse | string;
921
+ };
922
+ type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostApiV1ResponsesResponses];
690
923
  type PostApiV1SearchData = {
691
924
  /**
692
925
  * Search request
@@ -721,7 +954,7 @@ type PostAuthOauthByProviderExchangeData = {
721
954
  body: HandlersExchangeRequest;
722
955
  path: {
723
956
  /**
724
- * OAuth provider (google-drive)
957
+ * OAuth provider (google-drive, dropbox)
725
958
  */
726
959
  provider: string;
727
960
  };
@@ -753,7 +986,7 @@ type PostAuthOauthByProviderRefreshData = {
753
986
  body: HandlersRefreshRequest;
754
987
  path: {
755
988
  /**
756
- * OAuth provider (google-drive)
989
+ * OAuth provider (google-drive, dropbox)
757
990
  */
758
991
  provider: string;
759
992
  };
@@ -785,7 +1018,7 @@ type PostAuthOauthByProviderRevokeData = {
785
1018
  body: HandlersRevokeRequest;
786
1019
  path: {
787
1020
  /**
788
- * OAuth provider (google-drive)
1021
+ * OAuth provider (google-drive, dropbox)
789
1022
  */
790
1023
  provider: string;
791
1024
  };
@@ -1165,6 +1398,12 @@ declare const postApiV1ImagesGenerations: <ThrowOnError extends boolean = false>
1165
1398
  * Returns a list of all available models from the configured gateway with optional filters. Models include modality information indicating their capabilities (e.g., llm, embedding, vision, image, audio, reasoning, code, reranker, multimodal, video).
1166
1399
  */
1167
1400
  declare const getApiV1Models: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>) => RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>;
1401
+ /**
1402
+ * Create response
1403
+ *
1404
+ * Generates a response using the Responses API format. Supports streaming when stream=true.
1405
+ */
1406
+ declare const postApiV1Responses: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>) => RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>;
1168
1407
  /**
1169
1408
  * Create search
1170
1409
  *
@@ -1196,4 +1435,4 @@ declare const postAuthOauthByProviderRevoke: <ThrowOnError extends boolean = fal
1196
1435
  */
1197
1436
  declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
1198
1437
 
1199
- export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
1438
+ export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiResponseExtraFields, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseUsage, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type LlmapiTool, type LlmapiToolCall, type LlmapiToolCallFunction, type LlmapiToolFunction, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Responses, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
package/dist/index.mjs CHANGED
@@ -856,6 +856,16 @@ var getApiV1Models = (options) => {
856
856
  ...options
857
857
  });
858
858
  };
859
+ var postApiV1Responses = (options) => {
860
+ return (options.client ?? client).post({
861
+ url: "/api/v1/responses",
862
+ ...options,
863
+ headers: {
864
+ "Content-Type": "application/json",
865
+ ...options.headers
866
+ }
867
+ });
868
+ };
859
869
  var postApiV1Search = (options) => {
860
870
  return (options.client ?? client).post({
861
871
  url: "/api/v1/search",
@@ -909,6 +919,7 @@ export {
909
919
  postApiV1ChatCompletions,
910
920
  postApiV1Embeddings,
911
921
  postApiV1ImagesGenerations,
922
+ postApiV1Responses,
912
923
  postApiV1Search,
913
924
  postAuthOauthByProviderExchange,
914
925
  postAuthOauthByProviderRefresh,
@@ -173,6 +173,10 @@ type LlmapiMessage = {
173
173
  */
174
174
  content?: Array<LlmapiMessageContentPart>;
175
175
  role?: LlmapiRole;
176
+ /**
177
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
178
+ */
179
+ tool_calls?: Array<LlmapiToolCall>;
176
180
  };
177
181
  /**
178
182
  * ImageURL is used when Type=image_url
@@ -347,6 +351,30 @@ type LlmapiSearchUsage = {
347
351
  */
348
352
  cost_micro_usd?: number;
349
353
  };
354
+ type LlmapiToolCall = {
355
+ function?: LlmapiToolCallFunction;
356
+ /**
357
+ * ID is the unique identifier for this tool call
358
+ */
359
+ id?: string;
360
+ /**
361
+ * Type is the type of tool call (always "function" for now)
362
+ */
363
+ type?: string;
364
+ };
365
+ /**
366
+ * Function contains the function call details
367
+ */
368
+ type LlmapiToolCallFunction = {
369
+ /**
370
+ * Arguments is the JSON string of arguments to pass to the function
371
+ */
372
+ arguments?: string;
373
+ /**
374
+ * Name is the name of the function to call
375
+ */
376
+ name?: string;
377
+ };
350
378
 
351
379
  type AuthToken = string | undefined;
352
380
  interface Auth {
@@ -173,6 +173,10 @@ type LlmapiMessage = {
173
173
  */
174
174
  content?: Array<LlmapiMessageContentPart>;
175
175
  role?: LlmapiRole;
176
+ /**
177
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
178
+ */
179
+ tool_calls?: Array<LlmapiToolCall>;
176
180
  };
177
181
  /**
178
182
  * ImageURL is used when Type=image_url
@@ -347,6 +351,30 @@ type LlmapiSearchUsage = {
347
351
  */
348
352
  cost_micro_usd?: number;
349
353
  };
354
+ type LlmapiToolCall = {
355
+ function?: LlmapiToolCallFunction;
356
+ /**
357
+ * ID is the unique identifier for this tool call
358
+ */
359
+ id?: string;
360
+ /**
361
+ * Type is the type of tool call (always "function" for now)
362
+ */
363
+ type?: string;
364
+ };
365
+ /**
366
+ * Function contains the function call details
367
+ */
368
+ type LlmapiToolCallFunction = {
369
+ /**
370
+ * Arguments is the JSON string of arguments to pass to the function
371
+ */
372
+ arguments?: string;
373
+ /**
374
+ * Name is the name of the function to call
375
+ */
376
+ name?: string;
377
+ };
350
378
 
351
379
  type AuthToken = string | undefined;
352
380
  interface Auth {
@@ -9,6 +9,10 @@ type LlmapiMessage = {
9
9
  */
10
10
  content?: Array<LlmapiMessageContentPart>;
11
11
  role?: LlmapiRole;
12
+ /**
13
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
14
+ */
15
+ tool_calls?: Array<LlmapiToolCall>;
12
16
  };
13
17
  /**
14
18
  * ImageURL is used when Type=image_url
@@ -38,6 +42,30 @@ type LlmapiMessageContentPart = {
38
42
  * Role is the message role (system, user, assistant)
39
43
  */
40
44
  type LlmapiRole = string;
45
+ type LlmapiToolCall = {
46
+ function?: LlmapiToolCallFunction;
47
+ /**
48
+ * ID is the unique identifier for this tool call
49
+ */
50
+ id?: string;
51
+ /**
52
+ * Type is the type of tool call (always "function" for now)
53
+ */
54
+ type?: string;
55
+ };
56
+ /**
57
+ * Function contains the function call details
58
+ */
59
+ type LlmapiToolCallFunction = {
60
+ /**
61
+ * Arguments is the JSON string of arguments to pass to the function
62
+ */
63
+ arguments?: string;
64
+ /**
65
+ * Name is the name of the function to call
66
+ */
67
+ name?: string;
68
+ };
41
69
 
42
70
  /**
43
71
  * Converts an array of Vercel AI {@link UIMessage} objects into the
@@ -9,6 +9,10 @@ type LlmapiMessage = {
9
9
  */
10
10
  content?: Array<LlmapiMessageContentPart>;
11
11
  role?: LlmapiRole;
12
+ /**
13
+ * ToolCalls contains tool/function calls made by the assistant (only for assistant role)
14
+ */
15
+ tool_calls?: Array<LlmapiToolCall>;
12
16
  };
13
17
  /**
14
18
  * ImageURL is used when Type=image_url
@@ -38,6 +42,30 @@ type LlmapiMessageContentPart = {
38
42
  * Role is the message role (system, user, assistant)
39
43
  */
40
44
  type LlmapiRole = string;
45
+ type LlmapiToolCall = {
46
+ function?: LlmapiToolCallFunction;
47
+ /**
48
+ * ID is the unique identifier for this tool call
49
+ */
50
+ id?: string;
51
+ /**
52
+ * Type is the type of tool call (always "function" for now)
53
+ */
54
+ type?: string;
55
+ };
56
+ /**
57
+ * Function contains the function call details
58
+ */
59
+ type LlmapiToolCallFunction = {
60
+ /**
61
+ * Arguments is the JSON string of arguments to pass to the function
62
+ */
63
+ arguments?: string;
64
+ /**
65
+ * Name is the name of the function to call
66
+ */
67
+ name?: string;
68
+ };
41
69
 
42
70
  /**
43
71
  * Converts an array of Vercel AI {@link UIMessage} objects into the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reverbia/sdk",
3
- "version": "1.0.0-next.20251219162520",
3
+ "version": "1.0.0-next.20251219170400",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -72,7 +72,7 @@
72
72
  "homepage": "https://github.com/zeta-chain/ai-sdk#readme",
73
73
  "dependencies": {
74
74
  "@huggingface/transformers": "^3.8.0",
75
- "@reverbia/portal": "1.0.0-next.20251217051358",
75
+ "@reverbia/portal": "1.0.0-next.20251219155822",
76
76
  "ai": "5.0.93",
77
77
  "pdfjs-dist": "^4.10.38",
78
78
  "tesseract.js": "^6.0.1"