Logging helpers shared by route_request() / worker_loop(). Kept static (file-scope) so they don't leak into the public ABI; the chat lifecycle logs that use them are part of #270's request-tracing instrumentation.
| 366 | // (file-scope) so they don't leak into the public ABI; the chat lifecycle |
| 367 | // logs that use them are part of #270's request-tracing instrumentation. |
| 368 | static const char * api_format_name(ApiFormat format) { |
| 369 | switch (format) { |
| 370 | case ApiFormat::OPENAI_CHAT: return "chat"; |
| 371 | case ApiFormat::ANTHROPIC: return "anthropic"; |
| 372 | case ApiFormat::RESPONSES: return "responses"; |
| 373 | default: return "unknown"; |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | static size_t json_array_size(const json & value) { |
| 378 | return value.is_array() ? value.size() : 0; |
no outgoing calls
no test coverage detected