Make OpenAI-family strict mode routable and stop redacting payee words
Strict structured-output mode rejects uniqueItems, so every request to a gpt-5.6-family zero-data-retention endpoint failed with HTTP 400 behind a generic error; duplicates were already rejected server-side, so the keyword leaves the wire schemas, pinned by a strict-keyword allowlist test built from the ledger that hit this. The bare-BIC redaction pattern deleted every 8- and 11-letter word — Openbank, BAUMARKT, RACETRACKER — blinding the model to the payee it was asked to classify and tripping the unsafe-merchant check on honest answers. BICs now die only labeled or attached to their IBAN, account labels join the redaction secrets, an identifier-shaped merchant name degrades to a merchant-less proposal instead of failing the row, and a provider error inside an HTTP 200 envelope is reported as such (numeric code only) instead of as envelope corruption.
This commit is contained in:
@@ -65,7 +65,7 @@ func taxonomySchema() map[string]any {
|
||||
merchant := map[string]any{
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": []string{"name", "aliases"},
|
||||
"properties": map[string]any{"name": name, "aliases": map[string]any{"type": "array", "maxItems": 32, "uniqueItems": true, "items": name}},
|
||||
"properties": map[string]any{"name": name, "aliases": map[string]any{"type": "array", "maxItems": 32, "items": name}},
|
||||
}
|
||||
return map[string]any{
|
||||
"type": "object", "additionalProperties": false,
|
||||
|
||||
Reference in New Issue
Block a user