MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / api_format_name

Function api_format_name

server/src/server/http_server.cpp:368–375  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
368static 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
377static size_t json_array_size(const json & value) {
378 return value.is_array() ? value.size() : 0;

Callers 2

route_requestMethod · 0.85
worker_loopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected