@providerprotocol/ai 0.0.17 → 0.0.19
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/README.md +294 -114
- package/dist/anthropic/index.d.ts +1 -1
- package/dist/anthropic/index.js +5 -3
- package/dist/anthropic/index.js.map +1 -1
- package/dist/{chunk-MOU4U3PO.js → chunk-5FEAOEXV.js} +4 -68
- package/dist/chunk-5FEAOEXV.js.map +1 -0
- package/dist/chunk-DZQHVGNV.js +71 -0
- package/dist/chunk-DZQHVGNV.js.map +1 -0
- package/dist/chunk-SKY2JLA7.js +59 -0
- package/dist/chunk-SKY2JLA7.js.map +1 -0
- package/dist/{chunk-SVYROCLD.js → chunk-UMKWXGO3.js} +1 -1
- package/dist/chunk-UMKWXGO3.js.map +1 -0
- package/dist/chunk-WAKD3OO5.js +224 -0
- package/dist/chunk-WAKD3OO5.js.map +1 -0
- package/dist/content-DEl3z_W2.d.ts +276 -0
- package/dist/google/index.d.ts +3 -1
- package/dist/google/index.js +122 -4
- package/dist/google/index.js.map +1 -1
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +2 -1
- package/dist/image-Dhq-Yuq4.d.ts +456 -0
- package/dist/index.d.ts +59 -1460
- package/dist/index.js +89 -267
- package/dist/index.js.map +1 -1
- package/dist/ollama/index.d.ts +1 -1
- package/dist/ollama/index.js +5 -3
- package/dist/ollama/index.js.map +1 -1
- package/dist/openai/index.d.ts +47 -20
- package/dist/openai/index.js +309 -4
- package/dist/openai/index.js.map +1 -1
- package/dist/openrouter/index.d.ts +1 -1
- package/dist/openrouter/index.js +5 -3
- package/dist/openrouter/index.js.map +1 -1
- package/dist/{provider-D5MO3-pS.d.ts → provider-BBMBZuGn.d.ts} +11 -11
- package/dist/proxy/index.d.ts +652 -0
- package/dist/proxy/index.js +565 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/{retry-DZ4Sqmxp.d.ts → retry-DR7YRJDz.d.ts} +1 -1
- package/dist/stream-DRHy6q1a.d.ts +1013 -0
- package/dist/xai/index.d.ts +29 -1
- package/dist/xai/index.js +118 -4
- package/dist/xai/index.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunk-MOU4U3PO.js.map +0 -1
- package/dist/chunk-SVYROCLD.js.map +0 -1
|
@@ -308,7 +308,7 @@ interface ModelReference<TOptions = unknown> {
|
|
|
308
308
|
* @typeParam TParams - Provider-specific parameter type
|
|
309
309
|
* @internal
|
|
310
310
|
*/
|
|
311
|
-
interface LLMHandler<TParams =
|
|
311
|
+
interface LLMHandler<TParams = unknown> {
|
|
312
312
|
/**
|
|
313
313
|
* Binds a model ID to create an executable model instance.
|
|
314
314
|
*
|
|
@@ -333,7 +333,7 @@ interface LLMHandler<TParams = any> {
|
|
|
333
333
|
* @typeParam TParams - Provider-specific parameter type
|
|
334
334
|
* @internal
|
|
335
335
|
*/
|
|
336
|
-
interface EmbeddingHandler<TParams =
|
|
336
|
+
interface EmbeddingHandler<TParams = unknown> {
|
|
337
337
|
/** Supported input types for embeddings */
|
|
338
338
|
readonly supportedInputs: ('text' | 'image')[];
|
|
339
339
|
/**
|
|
@@ -359,7 +359,7 @@ interface EmbeddingHandler<TParams = any> {
|
|
|
359
359
|
* @typeParam TParams - Provider-specific parameter type
|
|
360
360
|
* @internal
|
|
361
361
|
*/
|
|
362
|
-
interface ImageHandler<TParams =
|
|
362
|
+
interface ImageHandler<TParams = unknown> {
|
|
363
363
|
/**
|
|
364
364
|
* Binds a model ID to create an executable image model.
|
|
365
365
|
*
|
|
@@ -382,7 +382,7 @@ interface ImageHandler<TParams = any> {
|
|
|
382
382
|
*
|
|
383
383
|
* @typeParam TParams - Provider-specific parameter type
|
|
384
384
|
*/
|
|
385
|
-
interface BoundLLMModel<TParams =
|
|
385
|
+
interface BoundLLMModel<TParams = unknown> {
|
|
386
386
|
/** The model identifier */
|
|
387
387
|
readonly modelId: string;
|
|
388
388
|
/** Reference to the parent provider */
|
|
@@ -396,7 +396,7 @@ interface BoundLLMModel<TParams = any> {
|
|
|
396
396
|
*
|
|
397
397
|
* @typeParam TParams - Provider-specific parameter type
|
|
398
398
|
*/
|
|
399
|
-
interface BoundEmbeddingModel<TParams =
|
|
399
|
+
interface BoundEmbeddingModel<TParams = unknown> {
|
|
400
400
|
/** The model identifier */
|
|
401
401
|
readonly modelId: string;
|
|
402
402
|
/** Reference to the parent provider */
|
|
@@ -419,7 +419,7 @@ interface BoundEmbeddingModel<TParams = any> {
|
|
|
419
419
|
* Request passed to provider's embed method.
|
|
420
420
|
* @internal
|
|
421
421
|
*/
|
|
422
|
-
interface EmbeddingRequest<TParams =
|
|
422
|
+
interface EmbeddingRequest<TParams = unknown> {
|
|
423
423
|
/** Inputs to embed */
|
|
424
424
|
inputs: EmbeddingInput[];
|
|
425
425
|
/** Provider-specific parameters (passed through unchanged) */
|
|
@@ -480,7 +480,7 @@ type EmbeddingInput = string | {
|
|
|
480
480
|
*
|
|
481
481
|
* @typeParam TParams - Provider-specific parameter type
|
|
482
482
|
*/
|
|
483
|
-
interface BoundImageModel<TParams =
|
|
483
|
+
interface BoundImageModel<TParams = unknown> {
|
|
484
484
|
/** The model identifier */
|
|
485
485
|
readonly modelId: string;
|
|
486
486
|
/** Reference to the parent provider */
|
|
@@ -535,7 +535,7 @@ interface Provider<TOptions = unknown> {
|
|
|
535
535
|
* @typeParam TParams - Model-specific parameters type
|
|
536
536
|
* @typeParam TOptions - Provider-specific options type
|
|
537
537
|
*/
|
|
538
|
-
type LLMProvider<TParams =
|
|
538
|
+
type LLMProvider<TParams = unknown, TOptions = unknown> = Provider<TOptions> & {
|
|
539
539
|
readonly modalities: {
|
|
540
540
|
llm: LLMHandler<TParams>;
|
|
541
541
|
};
|
|
@@ -548,7 +548,7 @@ type LLMProvider<TParams = any, TOptions = unknown> = Provider<TOptions> & {
|
|
|
548
548
|
* @typeParam TParams - Model-specific parameters type
|
|
549
549
|
* @typeParam TOptions - Provider-specific options type
|
|
550
550
|
*/
|
|
551
|
-
type EmbeddingProvider<TParams =
|
|
551
|
+
type EmbeddingProvider<TParams = unknown, TOptions = unknown> = Provider<TOptions> & {
|
|
552
552
|
readonly modalities: {
|
|
553
553
|
embedding: EmbeddingHandler<TParams>;
|
|
554
554
|
};
|
|
@@ -561,10 +561,10 @@ type EmbeddingProvider<TParams = any, TOptions = unknown> = Provider<TOptions> &
|
|
|
561
561
|
* @typeParam TParams - Model-specific parameters type
|
|
562
562
|
* @typeParam TOptions - Provider-specific options type
|
|
563
563
|
*/
|
|
564
|
-
type ImageProvider<TParams =
|
|
564
|
+
type ImageProvider<TParams = unknown, TOptions = unknown> = Provider<TOptions> & {
|
|
565
565
|
readonly modalities: {
|
|
566
566
|
image: ImageHandler<TParams>;
|
|
567
567
|
};
|
|
568
568
|
};
|
|
569
569
|
|
|
570
|
-
export { type BoundEmbeddingModel as B, type EmbeddingInput as E, type ImageHandler as I, type KeyStrategy as K, type LLMProvider as L, type Modality as M, type ProviderConfig as P, type RetryStrategy as R, UPPError as U, type EmbeddingUsage as a, type LLMHandler as b, type EmbeddingHandler as c, type Provider as d, type ErrorCode as e, type ModelReference as f, type EmbeddingProvider as g, type ImageProvider as h, type
|
|
570
|
+
export { type BoundEmbeddingModel as B, type EmbeddingInput as E, type ImageHandler as I, type KeyStrategy as K, type LLMProvider as L, type Modality as M, type ProviderConfig as P, type RetryStrategy as R, UPPError as U, type EmbeddingUsage as a, type LLMHandler as b, type EmbeddingHandler as c, type Provider as d, type ErrorCode as e, type ModelReference as f, type EmbeddingProvider as g, type ImageProvider as h, type EmbeddingRequest as i, type EmbeddingResponse as j, type EmbeddingVector as k };
|