Files
magpie/internal
yetone 1648fcfe27 gateway: Mistral requests carry a prompt_cache_key of their conversation (daoche_wuzui on X)
Mistral routes a request by prompt_cache_key to the server holding its
prompt cache; magpie sent none, so cache hits were poor. A Chat request
bound for Mistral (preset or api.mistral.ai) with no key gets the sha256
hex of the session, else the conversation id: opaque, stable per
conversation, never the raw id. A client's own key and a user's extraBody
key are kept; translated requests get it through ownCacheKey (its
refusal retry applies). Other vendors are unchanged.

Run (mote): TestMistralPromptCacheKey, TestOwnCacheKey, CacheKey tests,
then gofmt, go vet on darwin/windows/linux nogui, and the gateway
package. TestMistralPromptCacheKey was red on the old code (no key).
Not tried: a real Mistral API key.
2026-11-12 12:13:40 +08:00
..
…
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…
…
…
…