@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.
Files changed (45) hide show
  1. package/README.md +294 -114
  2. package/dist/anthropic/index.d.ts +1 -1
  3. package/dist/anthropic/index.js +5 -3
  4. package/dist/anthropic/index.js.map +1 -1
  5. package/dist/{chunk-MOU4U3PO.js → chunk-5FEAOEXV.js} +4 -68
  6. package/dist/chunk-5FEAOEXV.js.map +1 -0
  7. package/dist/chunk-DZQHVGNV.js +71 -0
  8. package/dist/chunk-DZQHVGNV.js.map +1 -0
  9. package/dist/chunk-SKY2JLA7.js +59 -0
  10. package/dist/chunk-SKY2JLA7.js.map +1 -0
  11. package/dist/{chunk-SVYROCLD.js → chunk-UMKWXGO3.js} +1 -1
  12. package/dist/chunk-UMKWXGO3.js.map +1 -0
  13. package/dist/chunk-WAKD3OO5.js +224 -0
  14. package/dist/chunk-WAKD3OO5.js.map +1 -0
  15. package/dist/content-DEl3z_W2.d.ts +276 -0
  16. package/dist/google/index.d.ts +3 -1
  17. package/dist/google/index.js +122 -4
  18. package/dist/google/index.js.map +1 -1
  19. package/dist/http/index.d.ts +2 -2
  20. package/dist/http/index.js +2 -1
  21. package/dist/image-Dhq-Yuq4.d.ts +456 -0
  22. package/dist/index.d.ts +59 -1460
  23. package/dist/index.js +89 -267
  24. package/dist/index.js.map +1 -1
  25. package/dist/ollama/index.d.ts +1 -1
  26. package/dist/ollama/index.js +5 -3
  27. package/dist/ollama/index.js.map +1 -1
  28. package/dist/openai/index.d.ts +47 -20
  29. package/dist/openai/index.js +309 -4
  30. package/dist/openai/index.js.map +1 -1
  31. package/dist/openrouter/index.d.ts +1 -1
  32. package/dist/openrouter/index.js +5 -3
  33. package/dist/openrouter/index.js.map +1 -1
  34. package/dist/{provider-D5MO3-pS.d.ts → provider-BBMBZuGn.d.ts} +11 -11
  35. package/dist/proxy/index.d.ts +652 -0
  36. package/dist/proxy/index.js +565 -0
  37. package/dist/proxy/index.js.map +1 -0
  38. package/dist/{retry-DZ4Sqmxp.d.ts → retry-DR7YRJDz.d.ts} +1 -1
  39. package/dist/stream-DRHy6q1a.d.ts +1013 -0
  40. package/dist/xai/index.d.ts +29 -1
  41. package/dist/xai/index.js +118 -4
  42. package/dist/xai/index.js.map +1 -1
  43. package/package.json +6 -1
  44. package/dist/chunk-MOU4U3PO.js.map +0 -1
  45. 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 = any> {
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 = any> {
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 = any> {
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 = any> {
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 = any> {
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 = any> {
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 = any> {
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 = any, TOptions = unknown> = Provider<TOptions> & {
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 = any, TOptions = unknown> = Provider<TOptions> & {
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 = any, TOptions = unknown> = Provider<TOptions> & {
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 BoundImageModel as i, type EmbeddingRequest as j, type EmbeddingResponse as k, type EmbeddingVector as l };
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 };