Expand description
Broker-proxied streaming call to Code Assist’s
v1internal:streamGenerateContent. Composes:
translate_generate_content_request(pure translator)CredentialBroker::proxy_stream(bearer + pinned host + no redirect)- line-buffered SSE decoding via
from_stream_line
The runtime never touches the OAuth access token, the refresh token, or auth.json — those live behind the broker boundary. Cancellation is honored between chunks so long streams terminate promptly.
Structs§
Enums§
- Stream
Error - Runtime-facing outcome of a single streamed model turn.
Constants§
- GEMINI_
EVENT_ CHANNEL_ CAPACITY - Bounded producer/consumer handoff for decoded Gemini events. The producer
awaits capacity (explicit backpressure); dropping the receiver makes
sendfail immediately and releases the pump.
Functions§
- build_
stream_ request - Build the exact-byte
ProxyRequestfor one streamed Code Assist turn. The JSON envelope is serialized once viaProxyRequest::post_json_exact; the returnedbytes::Byteshandle is the very bufferLocalBrokersends verbatim, so a caller-side trace digest over it describes the true wire body on the local-broker path. - gemini_
event_ channel_ snapshot - stream_
gemini - Start a broker-proxied streaming turn against Code Assist and yield
decoded events as they arrive. The returned stream is
Send + 'staticso it can be forwarded through the runtime’s event bus. - stream_
gemini_ request - Start one broker stream attempt from a prebuilt request (see
build_stream_request). Retry loops reuse the same request value per attempt so every attempt sends identical bytes.