Motivation & Context
callers that pass a lowercase user-agent in default_headers (reachable through OpenAI client options) end up sending two User-Agent lines, because the prepend logic checks "User-Agent" in headers with exact casing and then adds its own.
Reproduction
prepend_agent_framework_to_user_agent({"user-agent": "my-app/1.0"})
# -> both "User-Agent: agent-framework/..." and the original lowercase one survive
# httpx sends duplicate header lines
Expected behavior
header detection is case-insensitive (HTTP headers are case-insensitive); the framework value prepends to the caller's UA instead of duplicating it.
env: python main
Motivation & Context
callers that pass a lowercase
user-agentin default_headers (reachable through OpenAI client options) end up sending two User-Agent lines, because the prepend logic checks"User-Agent" in headerswith exact casing and then adds its own.Reproduction
Expected behavior
header detection is case-insensitive (HTTP headers are case-insensitive); the framework value prepends to the caller's UA instead of duplicating it.
env: python main