Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bifrost/lib/clients/jawnTypes/private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,9 @@ Json: JsonObject;
stop?: string[] | string;
tools?: {
function: {
parameters: components["schemas"]["Record_string.any_"];
description: string;
strict?: boolean;
parameters?: components["schemas"]["Record_string.any_"];
description?: string;
name: string;
};
/** @enum {string} */
Expand Down Expand Up @@ -1965,8 +1966,9 @@ Json: JsonObject;
};
Tool: {
name: string;
description: string;
description?: string;
parameters?: components["schemas"]["Record_string.any_"];
strict?: boolean;
};
HeliconeEventTool: {
/** @enum {string} */
Expand Down
8 changes: 5 additions & 3 deletions bifrost/lib/clients/jawnTypes/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,9 @@ export interface components {
stop?: string[] | string;
tools?: {
function: {
parameters: components["schemas"]["Record_string.any_"];
description: string;
strict?: boolean;
parameters?: components["schemas"]["Record_string.any_"];
description?: string;
name: string;
};
/** @enum {string} */
Expand Down Expand Up @@ -2041,8 +2042,9 @@ Json: JsonObject;
};
Tool: {
name: string;
description: string;
description?: string;
parameters?: components["schemas"]["Record_string.any_"];
strict?: boolean;
};
HeliconeEventTool: {
/** @enum {string} */
Expand Down
11 changes: 7 additions & 4 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,9 @@
"properties": {
"function": {
"properties": {
"strict": {
"type": "boolean"
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
Expand All @@ -1357,8 +1360,6 @@
}
},
"required": [
"parameters",
"description",
"name"
],
"type": "object"
Expand Down Expand Up @@ -4662,11 +4663,13 @@
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
"strict": {
"type": "boolean"
}
},
"required": [
"name",
"description"
"name"
],
"type": "object",
"additionalProperties": false
Expand Down
8 changes: 5 additions & 3 deletions helicone-mcp/src/types/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,9 @@ export interface components {
stop?: string[] | string;
tools?: {
function: {
parameters: components["schemas"]["Record_string.any_"];
description: string;
strict?: boolean;
parameters?: components["schemas"]["Record_string.any_"];
description?: string;
name: string;
};
/** @enum {string} */
Expand Down Expand Up @@ -2041,8 +2042,9 @@ Json: JsonObject;
};
Tool: {
name: string;
description: string;
description?: string;
parameters?: components["schemas"]["Record_string.any_"];
strict?: boolean;
};
HeliconeEventTool: {
/** @enum {string} */
Expand Down
2 changes: 1 addition & 1 deletion packages/llm-mapper/mappers/anthropic/chat-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const toExternalTools = (

return tools.map((tool) => ({
name: tool.name,
description: tool.description,
description: tool.description ?? "",
input_schema: tool.parameters || {},
}));
};
Expand Down
9 changes: 6 additions & 3 deletions packages/llm-mapper/mappers/openai/chat-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export interface OpenAIChatRequest {
type: "function";
function: {
name: string;
description: string;
parameters: Record<string, any>; // JSON Schema
description?: string;
parameters?: Record<string, any>; // JSON Schema
strict?: boolean;
};
}[];
tool_choice?:
Expand Down Expand Up @@ -294,7 +295,8 @@ const toExternalTools = (
function: {
name: tool.name,
description: tool.description,
parameters: tool.parameters || {},
parameters: tool.parameters,
strict: tool.strict,
},
}));
};
Expand All @@ -311,6 +313,7 @@ const convertTools = (
name: tool.function?.name,
description: tool.function?.description,
parameters: tool.function?.parameters,
strict: tool.function?.strict,
}));
};

Expand Down
2 changes: 1 addition & 1 deletion packages/llm-mapper/mappers/openai/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ const toExternalTools = (
type: "function",
function: {
name: tool?.name,
description: tool?.description,
description: tool?.description ?? "",
parameters: tool?.parameters || {},
},
}));
Expand Down
3 changes: 2 additions & 1 deletion packages/llm-mapper/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ export type Response = {
/* -------------------------------------------------------------------------- */
export interface Tool {
name: string;
description: string;
description?: string;
parameters?: Record<string, any>; // Strict JSON Schema type ("parameters" in OPENAI, "input_schema" in ANTHROPIC)
strict?: boolean; // OpenAI's strict mode for function calling
}
export interface FunctionCall {
id?: string;
Expand Down
5 changes: 3 additions & 2 deletions valhalla/jawn/src/tsoa-build/private/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ const models: TsoaRoute.Models = {
"max_completion_tokens": {"dataType":"double"},
"stream": {"dataType":"boolean"},
"stop": {"dataType":"union","subSchemas":[{"dataType":"array","array":{"dataType":"string"}},{"dataType":"string"}]},
"tools": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"parameters":{"ref":"Record_string.any_","required":true},"description":{"dataType":"string","required":true},"name":{"dataType":"string","required":true}},"required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}}},
"tools": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"strict":{"dataType":"boolean"},"parameters":{"ref":"Record_string.any_"},"description":{"dataType":"string"},"name":{"dataType":"string","required":true}},"required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}}},
"tool_choice": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["none"]},{"dataType":"enum","enums":["auto"]},{"dataType":"enum","enums":["required"]},{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}},"type":{"dataType":"string","required":true}}}]},
"parallel_tool_calls": {"dataType":"boolean"},
"reasoning_effort": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["minimal"]},{"dataType":"enum","enums":["low"]},{"dataType":"enum","enums":["medium"]},{"dataType":"enum","enums":["high"]}]},
Expand Down Expand Up @@ -1220,8 +1220,9 @@ const models: TsoaRoute.Models = {
"dataType": "refObject",
"properties": {
"name": {"dataType":"string","required":true},
"description": {"dataType":"string","required":true},
"description": {"dataType":"string"},
"parameters": {"ref":"Record_string.any_"},
"strict": {"dataType":"boolean"},
},
"additionalProperties": false,
},
Expand Down
11 changes: 7 additions & 4 deletions valhalla/jawn/src/tsoa-build/private/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3262,6 +3262,9 @@
"properties": {
"function": {
"properties": {
"strict": {
"type": "boolean"
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
Expand All @@ -3273,8 +3276,6 @@
}
},
"required": [
"parameters",
"description",
"name"
],
"type": "object"
Expand Down Expand Up @@ -4519,11 +4520,13 @@
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
"strict": {
"type": "boolean"
}
},
"required": [
"name",
"description"
"name"
],
"type": "object",
"additionalProperties": false
Expand Down
5 changes: 3 additions & 2 deletions valhalla/jawn/src/tsoa-build/public/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ const models: TsoaRoute.Models = {
"max_completion_tokens": {"dataType":"double"},
"stream": {"dataType":"boolean"},
"stop": {"dataType":"union","subSchemas":[{"dataType":"array","array":{"dataType":"string"}},{"dataType":"string"}]},
"tools": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"parameters":{"ref":"Record_string.any_","required":true},"description":{"dataType":"string","required":true},"name":{"dataType":"string","required":true}},"required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}}},
"tools": {"dataType":"array","array":{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"strict":{"dataType":"boolean"},"parameters":{"ref":"Record_string.any_"},"description":{"dataType":"string"},"name":{"dataType":"string","required":true}},"required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}}},
"tool_choice": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["none"]},{"dataType":"enum","enums":["auto"]},{"dataType":"enum","enums":["required"]},{"dataType":"nestedObjectLiteral","nestedProperties":{"function":{"dataType":"nestedObjectLiteral","nestedProperties":{"name":{"dataType":"string","required":true},"type":{"dataType":"enum","enums":["function"],"required":true}}},"type":{"dataType":"string","required":true}}}]},
"parallel_tool_calls": {"dataType":"boolean"},
"reasoning_effort": {"dataType":"union","subSchemas":[{"dataType":"enum","enums":["minimal"]},{"dataType":"enum","enums":["low"]},{"dataType":"enum","enums":["medium"]},{"dataType":"enum","enums":["high"]}]},
Expand Down Expand Up @@ -1584,8 +1584,9 @@ const models: TsoaRoute.Models = {
"dataType": "refObject",
"properties": {
"name": {"dataType":"string","required":true},
"description": {"dataType":"string","required":true},
"description": {"dataType":"string"},
"parameters": {"ref":"Record_string.any_"},
"strict": {"dataType":"boolean"},
},
"additionalProperties": false,
},
Expand Down
11 changes: 7 additions & 4 deletions valhalla/jawn/src/tsoa-build/public/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,9 @@
"properties": {
"function": {
"properties": {
"strict": {
"type": "boolean"
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
Expand All @@ -1357,8 +1360,6 @@
}
},
"required": [
"parameters",
"description",
"name"
],
"type": "object"
Expand Down Expand Up @@ -4662,11 +4663,13 @@
},
"parameters": {
"$ref": "#/components/schemas/Record_string.any_"
},
"strict": {
"type": "boolean"
}
},
"required": [
"name",
"description"
"name"
],
"type": "object",
"additionalProperties": false
Expand Down
8 changes: 5 additions & 3 deletions web/lib/clients/jawnTypes/private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,9 @@ Json: JsonObject;
stop?: string[] | string;
tools?: {
function: {
parameters: components["schemas"]["Record_string.any_"];
description: string;
strict?: boolean;
parameters?: components["schemas"]["Record_string.any_"];
description?: string;
name: string;
};
/** @enum {string} */
Expand Down Expand Up @@ -1965,8 +1966,9 @@ Json: JsonObject;
};
Tool: {
name: string;
description: string;
description?: string;
parameters?: components["schemas"]["Record_string.any_"];
strict?: boolean;
};
HeliconeEventTool: {
/** @enum {string} */
Expand Down
8 changes: 5 additions & 3 deletions web/lib/clients/jawnTypes/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,9 @@ export interface components {
stop?: string[] | string;
tools?: {
function: {
parameters: components["schemas"]["Record_string.any_"];
description: string;
strict?: boolean;
parameters?: components["schemas"]["Record_string.any_"];
description?: string;
name: string;
};
/** @enum {string} */
Expand Down Expand Up @@ -2041,8 +2042,9 @@ Json: JsonObject;
};
Tool: {
name: string;
description: string;
description?: string;
parameters?: components["schemas"]["Record_string.any_"];
strict?: boolean;
};
HeliconeEventTool: {
/** @enum {string} */
Expand Down
Loading