@chainfuse/ai-tools 0.13.6 → 0.13.7

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/models.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import type { LanguageModelValues, TextEmbeddingModelValues } from '@chainfuse/types';
1
+ import type { LanguageModelValues, TextEmbeddingModelValues } from '@chainfuse/types/ai-tools';
2
2
  import type { embed, embedMany, wrapLanguageModel } from 'ai';
3
3
  import { AiBase } from './base.mjs';
4
4
  import type { AiRegistry } from './registry.mjs';
@@ -1,5 +1,6 @@
1
1
  import { Helpers } from '@chainfuse/helpers';
2
- import { AiModels, enabledCloudflareLlmProviders } from '@chainfuse/types';
2
+ import { AiModels } from '@chainfuse/types/ai-tools';
3
+ import { enabledCloudflareLlmProviders } from '@chainfuse/types/ai-tools/workers-ai';
3
4
  import { customProvider, TypeValidationError, wrapLanguageModel } from 'ai';
4
5
  import { ZodError } from 'zod';
5
6
  import { AiBase } from '../base.mjs';
@@ -1,5 +1,5 @@
1
1
  import type { OpenAICompatibleProvider } from '@ai-sdk/openai-compatible';
2
- import type { cloudflareModelPossibilities } from '@chainfuse/types';
2
+ import type { cloudflareModelPossibilities } from '@chainfuse/types/ai-tools/workers-ai';
3
3
  import { AiBase } from '../base.mjs';
4
4
  import type { AiRequestConfig } from '../types.mjs';
5
5
  import type { AzureOpenAIProvider } from './types.mts';
@@ -122,7 +122,7 @@ export class AiRawProviders extends AiBase {
122
122
  ...(args.cache && { 'cf-aig-cache-ttl': (typeof args.cache === 'boolean' ? (args.cache ? this.cacheTtl : 0) : args.cache).toString() }),
123
123
  ...(args.skipCache && { 'cf-aig-skip-cache': 'true' }),
124
124
  },
125
- fetch: (input, rawInit) => Promise.all([import('../serverSelector.mjs'), import('@chainfuse/types/ai-tools/catalog/azure')])
125
+ fetch: (input, rawInit) => Promise.all([import('../serverSelector.mjs'), import('@chainfuse/types/ai-tools/azure/catalog')])
126
126
  .then(([{ ServerSelector }, { azureCatalog }]) => new ServerSelector(this.config).closestServers(azureCatalog))
127
127
  .then(async (filteredServers) => {
128
128
  const startRoundTrip = performance.now();
@@ -1,6 +1,6 @@
1
1
  import type { OpenAIChatSettings, OpenAIEmbeddingSettings } from '@ai-sdk/openai/internal';
2
2
  import type { EmbeddingModelV1, LanguageModelV1 } from '@ai-sdk/provider';
3
- import type { AzureChatModels, AzureEmbeddingModels } from '@chainfuse/types';
3
+ import type { AzureChatModels, AzureEmbeddingModels } from '@chainfuse/types/ai-tools/azure';
4
4
  import type { Provider } from 'ai';
5
5
  export interface AzureOpenAIProvider extends Provider {
6
6
  (deploymentId: AzureChatModels, settings?: OpenAIChatSettings): LanguageModelV1;
@@ -1,4 +1,4 @@
1
- import type { Coordinate } from '@chainfuse/types';
1
+ import type { Coordinate } from '@chainfuse/types/ai-tools';
2
2
  import type { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
3
3
  import { AiBase } from './base.mts';
4
4
  import type { PrivacyRegion, Servers } from './types.mjs';
package/dist/types.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import type { Coordinate, PrefixedUuid, UuidExport } from '@chainfuse/types';
2
- import type { azureCatalog } from '@chainfuse/types/ai-tools/catalog/azure';
1
+ import type { Coordinate } from '@chainfuse/types/ai-tools';
2
+ import type { azureCatalog } from '@chainfuse/types/ai-tools/azure/catalog';
3
+ import type { PrefixedUuid, UuidExport } from '@chainfuse/types/d1';
3
4
  import type { Ai, ExecutionContext, IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
4
5
  import type haversine from 'haversine-distance';
5
6
  export interface AiConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/ai-tools",
3
- "version": "0.13.6",
3
+ "version": "0.13.7",
4
4
  "description": "",
5
5
  "author": "ChainFuse",
6
6
  "homepage": "https://github.com/ChainFuse/packages/tree/main/packages/ai-tools#readme",
@@ -53,8 +53,8 @@
53
53
  "@ai-sdk/google": "^1.2.12",
54
54
  "@ai-sdk/openai": "^1.0.5",
55
55
  "@ai-sdk/openai-compatible": "^0.2.12",
56
- "@chainfuse/helpers": "^3.0.1",
57
- "@chainfuse/types": "^2.10.2",
56
+ "@chainfuse/helpers": "^3.0.2",
57
+ "@chainfuse/types": "^2.10.3",
58
58
  "ai": "^4.3.9",
59
59
  "chalk": "^5.4.1",
60
60
  "haversine-distance": "^1.2.3",
@@ -64,5 +64,5 @@
64
64
  "@cloudflare/workers-types": "^4.20250422.0",
65
65
  "openai": "^4.95.1"
66
66
  },
67
- "gitHead": "cdc081af61b02d5ad07ee205637659b79532c6f5"
67
+ "gitHead": "98d1970d468f91261928a84b86f655ba30f15ccd"
68
68
  }