MCPcopy Create free account
hub / github.com/codehamr/codehamr / dropDanglingToolCalls

Function dropDanglingToolCalls

internal/ctx/ctx.go:360–390  ·  view source on GitHub ↗

dropDanglingToolCalls removes any assistant message whose tool_calls include an id with no answering tool message in the kept slice: the mirror of dropOrphanTools. An assistant.tool_calls followed by fewer tool results than calls issued 400s every OpenAI-compatible backend with "missing tool respons

(kept []Message)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

PackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected