@inkeep/ai-sdk-provider 0.30.3 → 0.31.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
@@ -30,7 +30,7 @@ const inkeep = createInkeep({
30
30
  });
31
31
 
32
32
  const { text } = await generateText({
33
- model: inkeep('agent-123'),
33
+ model: inkeep(),
34
34
  prompt: 'What is the weather in NYC?',
35
35
  });
36
36
 
@@ -45,13 +45,14 @@ import { createInkeep } from '@inkeep/ai-sdk-provider';
45
45
 
46
46
  const inkeep = createInkeep({
47
47
  baseURL: proccess.env.INKEEP_AGENTS_RUN_API_URL,
48
+ apiKey: <your-agent-api-key>,
48
49
  headers: {
49
50
  'x-emit-operations': 'true', // Enable tool event streaming
50
51
  },
51
52
  });
52
53
 
53
54
  const result = await streamText({
54
- model: inkeep('agent-123'),
55
+ model: inkeep(),
55
56
  prompt: 'Plan an event in NYC',
56
57
  });
57
58
 
@@ -68,7 +69,7 @@ createInkeep({
68
69
  })
69
70
  ```
70
71
 
71
- ### Model Options
72
+ ### Provider Options
72
73
 
73
74
  Pass options when creating a provider instance:
74
75
 
@@ -86,7 +87,7 @@ import { inkeep } from '@inkeep/ai-sdk-provider';
86
87
  import { generateText } from 'ai';
87
88
 
88
89
  const result = await generateText({
89
- model: inkeep('agent-123', {
90
+ model: inkeep({
90
91
  conversationId: 'conv-123',
91
92
  headers: {
92
93
  'user-id': 'user-456',
@@ -152,7 +153,7 @@ const inkeep = createInkeep({
152
153
  });
153
154
 
154
155
  const result = await streamText({
155
- model: inkeep('agent-123'),
156
+ model: inkeep(),
156
157
  prompt: 'Search for recent papers on AI',
157
158
  });
158
159
 
@@ -198,9 +199,3 @@ The provider emits the following AI SDK v2 stream events:
198
199
  **Control Events** (always emitted):
199
200
  - `finish` - Stream completion with usage statistics
200
201
  - `error` - Stream error occurred
201
-
202
- ## Model Identification
203
-
204
- Models are identified by agent ID in the format:
205
- - `agent-123` - Direct agent ID
206
- - `inkeep/agent-123` - With provider prefix (when used with custom factories)
package/dist/index.cjs CHANGED
@@ -12745,7 +12745,7 @@ function convertDataOperationToToolEvent(opData) {
12745
12745
  }
12746
12746
  }
12747
12747
  var InkeepChatLanguageModel = class {
12748
- constructor(modelId, options, config2) {
12748
+ constructor(options, config2) {
12749
12749
  __publicField(this, "specificationVersion", "v2");
12750
12750
  __publicField(this, "defaultObjectGenerationMode");
12751
12751
  __publicField(this, "supportsImageUrls", false);
@@ -12753,7 +12753,7 @@ var InkeepChatLanguageModel = class {
12753
12753
  __publicField(this, "modelId");
12754
12754
  __publicField(this, "options");
12755
12755
  __publicField(this, "config");
12756
- this.modelId = modelId;
12756
+ this.modelId = "inkeep-agent";
12757
12757
  this.options = options;
12758
12758
  this.config = config2;
12759
12759
  }
@@ -12764,7 +12764,6 @@ var InkeepChatLanguageModel = class {
12764
12764
  const warnings = [];
12765
12765
  return {
12766
12766
  args: {
12767
- model: this.modelId,
12768
12767
  messages: convertToInkeepChatMessages(options.prompt),
12769
12768
  conversationId: this.options.conversationId,
12770
12769
  headers: this.options.headers,
@@ -12966,13 +12965,13 @@ function createInkeep(options = {}) {
12966
12965
  ...options.headers
12967
12966
  };
12968
12967
  };
12969
- const createChatModel = (agentId, chatOptions) => new InkeepChatLanguageModel(agentId, chatOptions ?? {}, {
12968
+ const createChatModel = (chatOptions) => new InkeepChatLanguageModel(chatOptions ?? {}, {
12970
12969
  provider: "inkeep",
12971
12970
  baseURL: getBaseURL(),
12972
12971
  headers: getHeaders,
12973
12972
  fetch: options.fetch
12974
12973
  });
12975
- const provider = (agentId, chatOptions) => createChatModel(agentId, chatOptions);
12974
+ const provider = (chatOptions) => createChatModel(chatOptions);
12976
12975
  provider.languageModel = createChatModel;
12977
12976
  return provider;
12978
12977
  }
package/dist/index.d.cts CHANGED
@@ -104,7 +104,7 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
104
104
  readonly options: InkeepChatOptions;
105
105
  readonly config: InkeepChatConfig;
106
106
  get provider(): string;
107
- constructor(modelId: string, options: InkeepChatOptions, config: InkeepChatConfig);
107
+ constructor(options: InkeepChatOptions, config: InkeepChatConfig);
108
108
  private getArgs;
109
109
  doGenerate(options: LanguageModelV2CallOptions): Promise<{
110
110
  content: LanguageModelV2Content[];
@@ -119,7 +119,6 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
119
119
  rawCall: {
120
120
  rawPrompt: InkeepChatMessage[];
121
121
  rawSettings: {
122
- model: string;
123
122
  messages: InkeepChatMessage[];
124
123
  conversationId: string | undefined;
125
124
  headers: Record<string, unknown> | undefined;
@@ -141,7 +140,6 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
141
140
  rawCall: {
142
141
  rawPrompt: InkeepChatMessage[];
143
142
  rawSettings: {
144
- model: string;
145
143
  messages: InkeepChatMessage[];
146
144
  conversationId: string | undefined;
147
145
  headers: Record<string, unknown> | undefined;
@@ -167,8 +165,8 @@ declare const inkeepErrorDataSchema: z.ZodObject<{
167
165
  type InkeepErrorData = z.infer<typeof inkeepErrorDataSchema>;
168
166
 
169
167
  interface InkeepProvider {
170
- (agentId: string, options?: InkeepChatOptions): InkeepChatLanguageModel;
171
- languageModel(agentId: string, options?: InkeepChatOptions): InkeepChatLanguageModel;
168
+ (options?: InkeepChatOptions): InkeepChatLanguageModel;
169
+ languageModel(options?: InkeepChatOptions): InkeepChatLanguageModel;
172
170
  }
173
171
  interface InkeepProviderSettings {
174
172
  baseURL?: string;
package/dist/index.d.ts CHANGED
@@ -104,7 +104,7 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
104
104
  readonly options: InkeepChatOptions;
105
105
  readonly config: InkeepChatConfig;
106
106
  get provider(): string;
107
- constructor(modelId: string, options: InkeepChatOptions, config: InkeepChatConfig);
107
+ constructor(options: InkeepChatOptions, config: InkeepChatConfig);
108
108
  private getArgs;
109
109
  doGenerate(options: LanguageModelV2CallOptions): Promise<{
110
110
  content: LanguageModelV2Content[];
@@ -119,7 +119,6 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
119
119
  rawCall: {
120
120
  rawPrompt: InkeepChatMessage[];
121
121
  rawSettings: {
122
- model: string;
123
122
  messages: InkeepChatMessage[];
124
123
  conversationId: string | undefined;
125
124
  headers: Record<string, unknown> | undefined;
@@ -141,7 +140,6 @@ declare class InkeepChatLanguageModel implements LanguageModelV2 {
141
140
  rawCall: {
142
141
  rawPrompt: InkeepChatMessage[];
143
142
  rawSettings: {
144
- model: string;
145
143
  messages: InkeepChatMessage[];
146
144
  conversationId: string | undefined;
147
145
  headers: Record<string, unknown> | undefined;
@@ -167,8 +165,8 @@ declare const inkeepErrorDataSchema: z.ZodObject<{
167
165
  type InkeepErrorData = z.infer<typeof inkeepErrorDataSchema>;
168
166
 
169
167
  interface InkeepProvider {
170
- (agentId: string, options?: InkeepChatOptions): InkeepChatLanguageModel;
171
- languageModel(agentId: string, options?: InkeepChatOptions): InkeepChatLanguageModel;
168
+ (options?: InkeepChatOptions): InkeepChatLanguageModel;
169
+ languageModel(options?: InkeepChatOptions): InkeepChatLanguageModel;
172
170
  }
173
171
  interface InkeepProviderSettings {
174
172
  baseURL?: string;
package/dist/index.js CHANGED
@@ -12743,7 +12743,7 @@ function convertDataOperationToToolEvent(opData) {
12743
12743
  }
12744
12744
  }
12745
12745
  var InkeepChatLanguageModel = class {
12746
- constructor(modelId, options, config2) {
12746
+ constructor(options, config2) {
12747
12747
  __publicField(this, "specificationVersion", "v2");
12748
12748
  __publicField(this, "defaultObjectGenerationMode");
12749
12749
  __publicField(this, "supportsImageUrls", false);
@@ -12751,7 +12751,7 @@ var InkeepChatLanguageModel = class {
12751
12751
  __publicField(this, "modelId");
12752
12752
  __publicField(this, "options");
12753
12753
  __publicField(this, "config");
12754
- this.modelId = modelId;
12754
+ this.modelId = "inkeep-agent";
12755
12755
  this.options = options;
12756
12756
  this.config = config2;
12757
12757
  }
@@ -12762,7 +12762,6 @@ var InkeepChatLanguageModel = class {
12762
12762
  const warnings = [];
12763
12763
  return {
12764
12764
  args: {
12765
- model: this.modelId,
12766
12765
  messages: convertToInkeepChatMessages(options.prompt),
12767
12766
  conversationId: this.options.conversationId,
12768
12767
  headers: this.options.headers,
@@ -12964,13 +12963,13 @@ function createInkeep(options = {}) {
12964
12963
  ...options.headers
12965
12964
  };
12966
12965
  };
12967
- const createChatModel = (agentId, chatOptions) => new InkeepChatLanguageModel(agentId, chatOptions ?? {}, {
12966
+ const createChatModel = (chatOptions) => new InkeepChatLanguageModel(chatOptions ?? {}, {
12968
12967
  provider: "inkeep",
12969
12968
  baseURL: getBaseURL(),
12970
12969
  headers: getHeaders,
12971
12970
  fetch: options.fetch
12972
12971
  });
12973
- const provider = (agentId, chatOptions) => createChatModel(agentId, chatOptions);
12972
+ const provider = (chatOptions) => createChatModel(chatOptions);
12974
12973
  provider.languageModel = createChatModel;
12975
12974
  return provider;
12976
12975
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/ai-sdk-provider",
3
- "version": "0.30.3",
3
+ "version": "0.31.0",
4
4
  "description": "AI SDK provider for Inkeep Agent Framework",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,7 +25,7 @@
25
25
  "@ai-sdk/provider": "^2.0.0",
26
26
  "@ai-sdk/provider-utils": "^3.0.12",
27
27
  "ai": "5.0.11",
28
- "@inkeep/agents-core": "0.30.3"
28
+ "@inkeep/agents-core": "0.31.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.11.24",