@core-ai/omnifact 0.14.0 → 0.15.0

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 (2) hide show
  1. package/dist/index.js +12 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/provider.ts
2
- import { createOpenAICompatChatProvider } from "@core-ai/openai/compat";
2
+ import { createOpenAIProvider } from "@core-ai/openai";
3
3
 
4
4
  // src/constants.ts
5
5
  var DEFAULT_BASE_URL = "https://connect.omnifact.ai/v1/gateway";
@@ -9,13 +9,22 @@ function createOmnifact(options = {}) {
9
9
  if (!options.apiKey) {
10
10
  throw new Error("createOmnifact: apiKey is required.");
11
11
  }
12
- return createOpenAICompatChatProvider(
12
+ const provider = createOpenAIProvider(
13
13
  {
14
14
  apiKey: options.apiKey,
15
15
  baseURL: options.baseURL ?? DEFAULT_BASE_URL
16
16
  },
17
- "omnifact"
17
+ {
18
+ providerId: "omnifact",
19
+ defaultApi: "chat-completions",
20
+ compatibility: {
21
+ maxTokensParameter: "max_completion_tokens"
22
+ }
23
+ }
18
24
  );
25
+ return {
26
+ chatModel: provider.chatModel
27
+ };
19
28
  }
20
29
  export {
21
30
  DEFAULT_BASE_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-ai/omnifact",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Omnifact provider package for @core-ai/core-ai",
5
5
  "license": "MIT",
6
6
  "author": "Omnifact (https://omnifact.ai)",
@@ -44,8 +44,8 @@
44
44
  "test:watch": "vitest"
45
45
  },
46
46
  "dependencies": {
47
- "@core-ai/core-ai": "^0.14.0",
48
- "@core-ai/openai": "^0.14.0"
47
+ "@core-ai/core-ai": "^0.15.0",
48
+ "@core-ai/openai": "^0.15.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "zod": "^4.0.0"