fix(a2a): drop dead headers option from discoverAgentCardCall

The backend /v1/a2a/discover endpoint no longer accepts a headers field
(removed in 78591b2 for SSRF safety), so any headers passed through
DiscoverAgentCardOptions were silently discarded by the API request
body. Remove the field and the conditional that copies it onto the
request body.
This commit is contained in:
mateo-berri 2026-05-28 03:05:01 +00:00
parent 7eb3f4d744
commit ac6bc79e54
No known key found for this signature in database

View file

@ -6342,7 +6342,6 @@ export interface DiscoverAgentCardOptions {
discovery_mode?: DiscoveryMode;
/** Mode-specific params. ``langgraph_platform`` requires ``assistant_id``. */
params?: Record<string, any>;
headers?: Record<string, string>;
}
export const discoverAgentCardCall = async (
@ -6354,7 +6353,6 @@ export const discoverAgentCardCall = async (
const body: Record<string, any> = { url };
if (options?.discovery_mode) body.discovery_mode = options.discovery_mode;
if (options?.params) body.params = options.params;
if (options?.headers) body.headers = options.headers;
const response = await fetch(endpoint, {
method: "POST",