MCPcopy Create free account
hub / github.com/coder/coder / ExtractResponseIDIfStored

Function ExtractResponseIDIfStored

coderd/x/chatd/chatopenai/responses.go:172–181  ·  view source on GitHub ↗

ExtractResponseIDIfStored returns the OpenAI response ID only when the provider options indicate store=true. Response IDs from store=false turns are not persisted server-side and cannot be used for chaining.

(
	providerOptions fantasy.ProviderOptions,
	metadata fantasy.ProviderMetadata,
)

Source from the content-addressed store, hash-verified

170// provider options indicate store=true. Response IDs from store=false turns are
171// not persisted server-side and cannot be used for chaining.
172func ExtractResponseIDIfStored(
173 providerOptions fantasy.ProviderOptions,
174 metadata fantasy.ProviderMetadata,
175) string {
176 if !IsResponsesStoreEnabled(providerOptions) {
177 return ""
178 }
179
180 return extractResponseID(metadata)
181}
182
183// ShouldActivateChainMode reports whether a follow-up turn can use
184// previous_response_id instead of replaying history. It requires store=true, a

Callers 4

RunFunction · 0.92

Calls 2

IsResponsesStoreEnabledFunction · 0.85
extractResponseIDFunction · 0.85