@core-ai/openai 0.14.0 → 0.16.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.
package/README.md CHANGED
@@ -29,16 +29,16 @@ const result = await generate({
29
29
  console.log(result.content);
30
30
  ```
31
31
 
32
- ## Chat Completions (Compat)
32
+ ## Chat Completions
33
33
 
34
- For the legacy Chat Completions API — useful for Azure OpenAI, proxies, or third-party OpenAI-compatible endpoints — import from `@core-ai/openai/compat`:
34
+ The same provider exposes OpenAI's strict Chat Completions API under `chat`:
35
35
 
36
36
  ```ts
37
37
  import { generate } from '@core-ai/core-ai';
38
- import { createOpenAICompat } from '@core-ai/openai/compat';
38
+ import { createOpenAI } from '@core-ai/openai';
39
39
 
40
- const openai = createOpenAICompat({ apiKey: process.env.OPENAI_API_KEY });
41
- const model = openai.chatModel('gpt-5-mini');
40
+ const openai = createOpenAI({ apiKey: process.env.OPENAI_API_KEY });
41
+ const model = openai.chat.chatModel('gpt-5-mini');
42
42
 
43
43
  const result = await generate({
44
44
  model,
@@ -47,3 +47,6 @@ const result = await generate({
47
47
 
48
48
  console.log(result.content);
49
49
  ```
50
+
51
+ Use `@core-ai/openai-compat` for third-party Chat Completions endpoints that
52
+ return nonstandard compatible fields.