stavfernandes.bsky.social
@stavfernandes.bsky.social
Your agent can generate images mid-conversation without a separate API call. Most builders don't wire this. The `image_generation` tool returns an `image_generation_call` output item, handled like any other tool call.
August 6, 2026 at 1:30 PM
You're calling the wrong image endpoint for the job. `images.generate` makes a new image from a prompt; a completely different call reads/edits an existing one. Check which one your feature actually needs.
August 5, 2026 at 1:30 PM
Realtime text events don't arrive in the order your code probably assumes. `conversation.item.create` then `response.create` then `response.output_text.delta` is the actual sequence. Build your state machine around it.
August 4, 2026 at 1:30 PM
You don't need a custom backend to ship a voice agent. `RealtimeAgent` + `RealtimeSession` + `session.connect()` from the Agents SDK is a working voice session in a few lines.
August 3, 2026 at 1:30 PM
Connecting a browser voice agent straight to OpenAI with your standard API key is how you leak it to every user. Ephemeral keys + WebRTC peer connection + the `oai-events` data channel is the actual path.
August 2, 2026 at 1:30 PM
You're still defaulting to Chat Completions on a new project. OpenAI recommends the Responses API for new builds: better reasoning-model behavior, native tool state, streaming events built in.
August 1, 2026 at 1:30 PM
You're manually managing conversation history in an array the API can hold for you. There are real cases for manual history (portability, audits). Just make sure yours is one of them.
July 31, 2026 at 1:30 PM
Your agent can take real-world actions with zero human checkpoint. The Agents SDK's human-in-the-loop flow pauses the run, records an interruption, and waits for `approve()`/`reject()` before anything executes.
July 30, 2026 at 1:30 PM
You built a custom web-search tool that OpenAI already hosts for you. Hosted tools exist before you write custom ones. Check the list before reaching for a scraper.
July 29, 2026 at 1:30 PM
Your agent has no boundary between it and your users. `inputGuardrails` and `outputGuardrails` in the Agents SDK check what goes in and what comes out automatically, not "we'll catch it in review."
July 28, 2026 at 1:30 PM
Stop building one giant agent that tries to do everything. The Agents SDK gives you `asTool()` and `handoff()`. Sometimes the right move is delegating to a specialist agent, not adding another branch to a mega-prompt.
July 27, 2026 at 1:30 PM
You wired a remote MCP server into your agent. Did you set a trust boundary? `server_label`, `server_url`, `allowed_tools`, and `require_approval` all exist for a reason.
July 26, 2026 at 1:30 PM
Your agent has 40 tools loaded into context and calls the wrong one half the time. `tool_choice: { type: "allowed_tools" }` narrows the decision space instead of just hoping the model picks right.
July 25, 2026 at 1:30 PM
Function calling breaks silently when the round trip is wrong. Define the tool, get the call, return `function_call_output` matched by `call_id`. Miss that last step and the model just... doesn't know what happened.
July 24, 2026 at 1:30 PM
"The model almost always returns valid JSON" is not a contract. `text.format` with a json_schema and `strict: true` makes the shape guaranteed, not probable.
July 23, 2026 at 1:30 PM
Your streaming UI probably only handles the happy path. `response.output_text.delta`, `response.completed`, and `response.error` are three different event types your client needs to branch on, not one stream of text.
July 22, 2026 at 1:30 PM
You're re-sending the entire conversation history on every call. `previous_response_id` chains turns server-side, and `responses.compact()` trims a long chain without losing context. Both are real, both are underused.
July 21, 2026 at 1:30 PM
You're paying reasoning-token prices for tasks that don't need to reason. `reasoning.effort` (none → xhigh) is the knob most teams never touch. Default medium isn't always right.
July 20, 2026 at 1:30 PM
You're sending OpenAI requests shaped like it's still 2023. `instructions` vs `input`, `text.verbosity`, and where tools actually sit in the payload. The anatomy changed and most snippets floating around online haven't caught up.
July 19, 2026 at 1:30 PM
Your first `client.responses.create()` call is probably shaped like a Chat Completions call with the serial numbers filed off. The Responses API isn't a rename: streaming, tool use, and `output_text` all work differently from day one.
July 18, 2026 at 1:30 PM
Your voice agent drops audio the moment the connection hiccups, and you find out from a user, not a log. AI SDK 7 brings realtime voice support into the same SDK you're already using for text and tools.
July 17, 2026 at 1:30 PM
Stop re-uploading the same PDF on every single call in a multi-step agent. AI SDK 7's `uploadFile` uploads once and returns a `ProviderReference` you reuse across calls.
July 16, 2026 at 1:30 PM
Your agent loop can hang indefinitely on one slow tool call and you'd never know until a user complains. AI SDK 7 adds `totalMs`, `stepMs`, `chunkMs`, and `toolMs` timeout budgets. Set them.
July 15, 2026 at 1:30 PM
One crash mid-workflow and your multi-step agent loses all its progress. `WorkflowAgent` in AI SDK 7 adds durability, streaming, approvals, and typed context to multi-step runs.
July 14, 2026 at 1:30 PM
Your agent can run shell commands directly against your infrastructure. AI SDK 7's `experimental_sandbox` gives tools an execution environment to delegate to. It doesn't sandbox anything on its own, the tool has to use it.
July 13, 2026 at 1:30 PM