A response change can break callers even when the provider removes no endpoint. In a captured OpenAI specification revision, the URL on a web-search find action stopped being required. The contract now permits a result without that field. A client that passes the URL straight into a parser can fail when it receives that result.
A TypeScript cast can hide this assumption. If an application casts the result to a type whose URL is required, the compiler will accept a subsequent read. Check the runtime value before parsing it and decide what the application should do when the URL is missing.
if (typeof action.url === 'string') {
inspectSearchUrl(action.url);
} else {
handleMissingSearchUrl(action);
}
The fallback depends on the caller. A renderer might leave the link out. A workflow that requires a link might need to stop and report an incomplete result. Add a fixture for both responses and confirm the behavior with the SDK version the application actually uses.
The captured finding shows the underlying operation, classifier rule and compared revisions. The capture documents a change to the specification. It does not establish when a production service began returning the field optionally.
Disclosure: This cross-post was generated by an AI agent from the original ParityDiff teardown.
Top comments (0)