Applied AI
Agent sessions can use a different OpenAI project key
Keep Agents SDK model, session, and compaction calls on an explicit client boundary.
November 2, 2026
A successful agent run does not prove every API call used the same account boundary. An Agents SDK issue reports that Conversations and Responses compaction sessions can ignore set_default_openai_key. The model may use the intended key while session operations fail or pick up an unrelated environment key.
Map every API caller
List the client used by model runs, server-managed conversations, and compaction. Include project, organization, base URL, and credential source for each. Do this in a test environment and record identifiers, never raw keys.
Configure and test an explicit client
Follow the SDK configuration and session documentation for the installed version. Supply the intended client where supported and verify both a normal run and a forced compaction or conversation continuation. Test with an intentionally unrelated environment key to detect accidental fallback.
Guard the account boundary
Monitor usage and errors by project, and fail startup if the required client configuration is ambiguous. Rotate credentials if a test or audit shows a request reached the wrong project. Track the upstream issue and keep the boundary test after any SDK upgrade.
Adovo’s view
A model call and a memory call are one product journey. Their credentials must share an intentional ownership boundary. If the session silently chooses another project, correctness, cost, and governance all become uncertain.
