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

Function ensureThoughtSignature

internal/googleopenai/thought_signature.go:147–163  ·  view source on GitHub ↗

Real provider signatures are preserved when present.

(toolCall map[string]any)

Source from the content-addressed store, hash-verified

145
146// Real provider signatures are preserved when present.
147func ensureThoughtSignature(toolCall map[string]any) bool {
148 extraContent, _ := toolCall["extra_content"].(map[string]any)
149 google, _ := extraContent["google"].(map[string]any)
150 if signature, _ := google["thought_signature"].(string); signature != "" {
151 return false
152 }
153 if extraContent == nil {
154 extraContent = map[string]any{}
155 toolCall["extra_content"] = extraContent
156 }
157 if google == nil {
158 google = map[string]any{}
159 extraContent["google"] = google
160 }
161 google["thought_signature"] = DummyThoughtSignature
162 return true
163}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected