ai 3.2.4 → 3.2.6

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/index.d.mts CHANGED
@@ -48,7 +48,7 @@ Tool choice for the generation. It supports the following settings:
48
48
  - `auto` (default): the model can choose whether and which tools to call.
49
49
  - `required`: the model must call a tool. It can choose which tool to call.
50
50
  - `none`: the model must not call tools
51
- - `{ type: 'tool', tooName: string (typed) }`: the model must call the specified tool
51
+ - `{ type: 'tool', toolName: string (typed) }`: the model must call the specified tool
52
52
  */
53
53
  type CoreToolChoice<TOOLS extends Record<string, unknown>> = 'auto' | 'none' | 'required' | {
54
54
  type: 'tool';
package/dist/index.d.ts CHANGED
@@ -48,7 +48,7 @@ Tool choice for the generation. It supports the following settings:
48
48
  - `auto` (default): the model can choose whether and which tools to call.
49
49
  - `required`: the model must call a tool. It can choose which tool to call.
50
50
  - `none`: the model must not call tools
51
- - `{ type: 'tool', tooName: string (typed) }`: the model must call the specified tool
51
+ - `{ type: 'tool', toolName: string (typed) }`: the model must call the specified tool
52
52
  */
53
53
  type CoreToolChoice<TOOLS extends Record<string, unknown>> = 'auto' | 'none' | 'required' | {
54
54
  type: 'tool';
package/dist/index.js CHANGED
@@ -1976,10 +1976,11 @@ var DefaultProviderRegistry = class {
1976
1976
  return provider;
1977
1977
  }
1978
1978
  splitId(id) {
1979
- if (!id.includes(":")) {
1979
+ const index = id.indexOf(":");
1980
+ if (index === -1) {
1980
1981
  throw new InvalidModelIdError({ id });
1981
1982
  }
1982
- return id.split(":");
1983
+ return [id.slice(0, index), id.slice(index + 1)];
1983
1984
  }
1984
1985
  languageModel(id) {
1985
1986
  var _a, _b;