fix(http): support auth_tools: null and static headers to override auto-generated auth#19
Open
JacobSampson wants to merge 2 commits intouniversal-tool-calling-protocol:mainfrom
Conversation
When converting OpenAPI specs to UTCP tools, setting auth_tools: null
in the HttpCallTemplate now explicitly disables auto-generated auth
placeholders (e.g., ${datadog_API_KEY_500}).
This allows users to handle authentication via custom headers instead
of the auto-generated auth configuration.
Changes:
- Pass auth_tools from HttpCallTemplate to OpenApiConverter
- Update OpenApiConverterOptions interface to accept Auth | null
- Add null check in _extractAuth to return undefined when auth disabled
Contributor
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/http/package.json">
<violation number="1" location="packages/http/package.json:2">
P2: Package name was renamed to @aprovan/utcp-http but the repo still references @utcp/http in tsconfig paths, dependencies, and imports; this will break builds unless the rename is propagated or reverted.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/http/package.json
Outdated
| { | ||
| "name": "@utcp/http", | ||
| "version": "1.1.0", | ||
| "name": "@aprovan/utcp-http", |
Contributor
There was a problem hiding this comment.
P2: Package name was renamed to @aprovan/utcp-http but the repo still references @utcp/http in tsconfig paths, dependencies, and imports; this will break builds unless the rename is propagated or reverted.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/http/package.json, line 2:
<comment>Package name was renamed to @aprovan/utcp-http but the repo still references @utcp/http in tsconfig paths, dependencies, and imports; this will break builds unless the rename is propagated or reverted.</comment>
<file context>
@@ -1,6 +1,6 @@
{
- "name": "@utcp/http",
- "version": "1.1.0",
+ "name": "@aprovan/utcp-http",
+ "version": "1.1.1",
"description": "HTTP utilities for UTCP",
</file context>
f658735 to
7dc1273
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When converting OpenAPI specs to UTCP tools, setting
auth_tools: nullin theHttpCallTemplatenow explicitly disables auto-generated auth placeholders. Additionally,headersare now attached to tool calls.This allows users to handle authentication via custom headers instead of the auto-generated auth configuration.
Changes
auth_tools: nullin theHttpCallTemplateheadersto tool calls from theHttpCallTemplatePreviously, when loading an OpenAPI spec (e.g. Datadog), the converter may auto-generate undesired auth placeholders (e.g.
${datadog_API_KEY_500},${datadog_API_KEY_614}). These variables were required even when auth may be handled differently via custom headers.Set
auth_tools: nullto explicitly disable auto-generated auth{ "name": "datadog", "call_template_type": "http", "url": "https://raw.githubusercontent.com/DataDog/datadog-api-client-python/refs/heads/master/.generator/schemas/v2/openapi.yaml", "http_method": "GET", // Manually disable auto-generated auth tools, relying on a pre-defined set of headers "auth_tools": null, "headers": { "DD-APPLICATION-KEY": "xxx", "DD-API-KEY": "xxx" } }