请求凭据(Credential)

Asks the app for the credential authConfig describes: when the model called the tool on a turn-based run, the next event carries a sign-in request for it. A tool re-run after the app answers asks for nothing, so a tool still without a credential reports that to the model rather than asking again. Only a tool call has a functionCallId, so this can only be called in a tool context.

Throws

if an OAuth2 or OpenID Connect authConfig can't produce an authorization URL, as when it has no OAuth2 raw credential or client ID, asks for a code challenge method other than S256, or has only a discovery URL.