Conversation
…25 endpoint Users were receiving a 422 Unprocessable Entity error when creating prompts with tool definitions that include OpenAI's strict mode (strict: true) and additionalProperties: false in the function parameters. Changes: - Add `strict` field to OpenAIChatRequest tools function interface - Make `description` and `parameters` optional in tool function definition to match OpenAI's API behavior - Update internal Tool type to include `strict` property - Update toExternalTools and convertTools functions to preserve the strict field - Update TSOA validation schemas in routes.ts to accept strict mode This allows prompts with tool calls using OpenAI's strict mode for function calling to be created and validated correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Co-Authored-By: Hammad Shami <hammad@helicone.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Claude finished @replicas-connector[bot]'s task —— View job Code Review CompleteScore: 8/10 - Good implementation with minor improvement suggestions Suggestions Summary:
Detailed Analysis:✅ Positive Aspects:
|
|
CI/CD Failure - Resolved Workflow Fix: Fixed TypeScript compilation errors caused by making Commit: 00ce337 |
Fix TypeScript compilation errors by providing default empty string when tool.description is undefined in toExternalTools functions for Anthropic and OpenAI responses mappers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CI/CD Failure - Resolved Workflow Fix: This failure was caused by the same TypeScript compilation error as the Worker AI Gateway Tests failure. The fix was already committed in 00ce337, which adds nullish coalescing ( New workflow runs are now in progress for commit 00ce337. |
|
CI/CD Failure - Resolved Workflow Fix: This failure was caused by the same TypeScript compilation error that has been fixed in commit 00ce337. The fix adds nullish coalescing ( New workflow runs are now in progress for commit 00ce337. |
This reverts commit 00ce337. The nullish coalescing changes were not necessary - the actual fix was regenerating the TSOA routes files to pick up the updated type definitions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
Since the Tool interface's description field is now optional (string | undefined), the toExternalTools functions need to provide a default empty string when converting to external API types that expect a required string field. This fixes TypeScript compilation errors in anthropic/chat-v2.ts and openai/responses.ts mappers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
|
CI/CD Failure - Unresolved (Infrastructure Issue) Workflow Findings: This failure is not related to code changes. The error message is:
This is a GitHub Actions infrastructure issue where the hosted runner was not available to execute the job. This is a transient problem that should resolve on retry. The workflow can be re-run manually or will likely succeed on the next push. |
Ticket
ENG-3845 - Check parameters for Facilitator tool call in promptBody
Component/Service
What part of Helicone does this affect?
Type of Change
Deployment Notes
Screenshots / Demos
N/A - API-only change
Extra Notes
Users were receiving a 422 Unprocessable Entity error when creating prompts with tool definitions that include OpenAI's strict mode (
strict: true) andadditionalProperties: falsein the function parameters.Root Cause:
The
OpenAIChatRequestinterface inpackages/llm-mapper/mappers/openai/chat-v2.tswas missing thestrictfield in the tool function definition. Since TSOA is configured withnoImplicitAdditionalProperties: "throw-on-extras", any request with extra properties likestrict: truewas being rejected with a 422 validation error.Changes Made:
strict?: booleanfield to the tool function interface inOpenAIChatRequestdescriptionandparametersoptional to match OpenAI's API (they're not strictly required)Tooltype to include thestrictpropertytoExternalToolsandconvertToolsfunctions to preserve thestrictfieldExample Request That Now Works:
{ "tools": [ { "type": "function", "function": { "name": "facilitator", "description": "...", "parameters": { "type": "object", "required": ["optimized_user_request", "conversation_context"], "properties": { ... }, "additionalProperties": false }, "strict": true } } ] }Context
A user was unable to create prompts via the
/v1/prompt-2025endpoint when their prompt body included tool definitions with OpenAI's strict mode enabled. This is a common pattern for users who want to ensure their tool calls have validated parameters.🤖 Generated with Claude Code