-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
TangoClient doesn't accept custom headers or a user_agent parameter. Callers that need to identify themselves (e.g. tango-mcp setting User-Agent: tango-mcp/0.7.2) have to reach into the internal httpx.Client and mutate headers after construction:
real_client = TangoClient(api_key=key, base_url=base_url)
real_client.client.headers["User-Agent"] = "tango-mcp/0.7.2"This works but couples callers to the httpx implementation detail.
Proposal
Add optional parameters to TangoClient.__init__:
def __init__(
self,
api_key: str | None = None,
base_url: str = "https://tango.makegov.com",
user_agent: str | None = None,
headers: dict[str, str] | None = None,
):user_agentsets theUser-Agentheader (appended to or replacing the default)headersmerges additional headers into every request (e.g. for tracing, source identification)
This would let tango-mcp do:
TangoClient(api_key=key, user_agent="tango-mcp/0.7.2")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels