๊ฐ€์ž… ํ›„ ์ดˆ๋Œ€ ๋งํฌ๋ฅผ ๊ณต์œ ํ•˜๋ฉด ๋™์˜์ƒ ์žฌ์ƒ ๋ฐ ์ดˆ๋Œ€ ๋ณด์ƒ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
๊ฐ€์ž… May 2026
280 ํŒ”๋กœ์ž‰ ์ค‘    415 ํŒฌ
# Useful but Little-Known Features of OpenAI Agent SDK ๐ŸŒ Ever wanted to pass provider-specific parameters that the SDK doesn't directly expose? With `extra_args`, you can add arbitrary provider-specific fields to `ModelSettings`. ๐Ÿ“Œ Title: Passing extra_args ๐Ÿ”— URL: ๐Ÿงฉ Overview By passing a dictionary to the `extra_args` parameter of `ModelSettings`, you can send provider-specific request fields that aren't exposed as top-level SDK properties. For example, you can specify OpenAI Responses API fields like `service_tier` or `user`. This lets you use new API parameters without waiting for an SDK update. ๐Ÿ›  How to use it ```python from agents import Agent, ModelSettings agent = Agent( name="English agent", instructions="You only speak English", model="gpt-4.1", model_settings=ModelSettings( temperature=0.1, extra_args={ "service_tier": "flex", "user": "user_12345", }, ), ) ``` ๐Ÿ— Building it into production ใƒปUse `service_tier` for cost optimization (e.g., `"flex"` for cheaper low-priority batch processing) ใƒปSet the `user` field to enable per-user tracking and abuse detection ใƒปAdopt new API parameters immediately on release without waiting for SDK updates ใƒปBuild `extra_args` dynamically from environment variables or config files for per-environment tuning ๐Ÿ’ก Use cases ๐Ÿ’ฐ Cost reduction with `service_tier: "flex"` for batch workloads ๐Ÿ‘ค Per-user usage tracking via the `user` field ๐Ÿ”ง Early adoption of newly released provider features ๐Ÿข Injecting tenant-specific parameters in multi-tenant environments โš ๏ธ Watch out Do not set the same request field through both a direct `ModelSettings` property and `extra_args`. Duplicate settings may cause unexpected behavior. Values passed via `extra_args` must conform to the provider's API specification, as the SDK does not validate them. โœจ With extra_args, unlock provider-specific optimizations beyond the SDK's built-in surface. #OpenAIAgentSDK# #AIAgent#
๋” ๋ณด๊ธฐ