Skip to content

Commit d0b63b4

Browse files
committed
update docstring
1 parent 329d9b4 commit d0b63b4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/agents/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from collections.abc import Iterator
2-
from contextlib import contextmanager
31
import logging
42
import sys
3+
from collections.abc import Iterator
4+
from contextlib import contextmanager
55
from typing import Literal
66

77
from openai import AsyncOpenAI
@@ -163,8 +163,13 @@ def set_default_openai_api(api: Literal["chat_completions", "responses"]) -> Non
163163

164164
@contextmanager
165165
def user_agent_override(user_agent: str | None) -> Iterator[None]:
166-
"""Set the user agent override for OpenAI LLM requests. This is useful if you want to set a custom
167-
user agent for OpenAI LLM requests.
166+
"""
167+
Temporarily override the User-Agent header for outbound OpenAI LLM requests.
168+
169+
This is **not** part of the public API and may change or be removed at any time
170+
without notice. Intended only for OpenAI-maintained packages and tests.
171+
172+
External integrators should use `model_settings.extra_headers` instead.
168173
"""
169174
with _config.user_agent_override(user_agent):
170175
yield

0 commit comments

Comments
 (0)