Files
ragflow/internal/entity
jay77721 74f6355791 feat(go-models): migrate batch 6 model drivers to unified usage recording (#17775)
## Summary

Relate to #17284.

Completes the migration of the four non-OpenAI-compatible model drivers
(`anthropic`, `cohere`, `google`, `bedrock`) onto the shared
usage-recording path. Earlier batches (#17634, #17643, #17696–#17700)
covered only the OpenAI-compatible cluster; these four providers ship
wire formats that do not fit the OpenAI `choices[0].delta` / `usage`
block template and so were left for a separate pass.

Per the maintainer's guidance for this batch, each driver is migrated on
its own terms rather than forced through a single template. The shared
machinery used is intentionally small: `recordResponseUsage`,
`parseChatCompletionResponse`, `BaseModel.newJSONPostRequest`, and the
existing `authHeader` hook for non-Bearer auth.

Co-authored-by: Haruko386 <tryeverypossible@163.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-04 14:07:45 +08:00
..
2026-07-24 22:00:09 +08:00
2026-08-03 21:30:01 +08:00
2026-07-16 16:00:56 +08:00
2026-08-01 22:06:56 +08:00
2026-07-16 16:00:56 +08:00
2026-07-16 16:00:56 +08:00
2026-07-16 16:00:56 +08:00
2026-07-16 16:00:56 +08:00
2026-07-16 16:00:56 +08:00