mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-13 07:40:56 +00:00
* feat(relaykit): preserve hosted tools across conversions - add protocol-neutral hosted-tool DTOs, conversion metadata, and loss policies - bridge citations, grounding metadata, and hosted-tool stream lifecycles - document the public conversion behavior and channel policy controls * refactor(relaykit): normalize reasoning and thinking intent - centralize provider-neutral reasoning intent, effort, and budget mappings - parse model suffixes at the host entry boundary while preserving provider-owned tails - keep adaptive Claude thinking and explicit zero-token compatibility consistent * fix(billing): preserve authoritative usage across relay hops - carry native BillingUsage sidecars through direct and streamed protocol bridges - merge partial and terminal usage monotonically with safe fallback settlement - retain cache metadata, penultimate usage, and per-call Gemini tool surcharges * feat(relay): bridge Responses with Claude and Gemini protocols - add direct request, response, and stream converters across supported relay formats - expose Claude count_tokens and Chat-to-Responses compatibility endpoints - carry conversion diagnostics through the host while retaining the curated public goldens * fix(relay): wire relaykit conversions into host channels - connect handlers, adaptors, and channel settings to the standalone conversion layer - keep model mapping, pricing identity, retries, and provider-specific suffix behavior aligned - ignore local audit artifacts and retain focused public regression coverage
118 lines
2.6 KiB
JSON
118 lines
2.6 KiB
JSON
{
|
|
"id": "chatcmpl-fixed",
|
|
"object": "response",
|
|
"created_at": 0,
|
|
"status": "completed",
|
|
"instructions": null,
|
|
"max_output_tokens": 0,
|
|
"model": "gpt-test",
|
|
"output": [
|
|
{
|
|
"type": "reasoning",
|
|
"id": "chatcmpl-fixed_reasoning_0",
|
|
"status": "completed",
|
|
"role": "",
|
|
"content": null,
|
|
"summary": [
|
|
{
|
|
"type": "summary_text",
|
|
"text": "Deep thought."
|
|
}
|
|
],
|
|
"quality": "",
|
|
"size": ""
|
|
},
|
|
{
|
|
"type": "message",
|
|
"id": "chatcmpl-fixed_msg_0",
|
|
"status": "completed",
|
|
"role": "assistant",
|
|
"content": [
|
|
{
|
|
"type": "output_text",
|
|
"text": "The answer is 42.",
|
|
"annotations": []
|
|
}
|
|
],
|
|
"quality": "",
|
|
"size": ""
|
|
},
|
|
{
|
|
"type": "function_call",
|
|
"id": "call_abc",
|
|
"status": "completed",
|
|
"role": "",
|
|
"content": null,
|
|
"quality": "",
|
|
"size": "",
|
|
"call_id": "call_abc",
|
|
"name": "get_weather",
|
|
"arguments": "{\"city\":\"Paris\"}"
|
|
}
|
|
],
|
|
"parallel_tool_calls": false,
|
|
"previous_response_id": null,
|
|
"reasoning": null,
|
|
"store": false,
|
|
"temperature": 0,
|
|
"tool_choice": null,
|
|
"tools": null,
|
|
"top_p": 0,
|
|
"truncation": null,
|
|
"usage": {
|
|
"prompt_tokens": 10,
|
|
"completion_tokens": 5,
|
|
"total_tokens": 15,
|
|
"billing_usage": {
|
|
"source": "oai_chat",
|
|
"semantic": "openai",
|
|
"openai_usage": {
|
|
"prompt_tokens": 10,
|
|
"completion_tokens": 5,
|
|
"total_tokens": 15,
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 3,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"completion_tokens_details": {
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0,
|
|
"reasoning_tokens": 2
|
|
},
|
|
"input_tokens": 0,
|
|
"output_tokens": 0,
|
|
"input_tokens_details": null,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
},
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 0,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"completion_tokens_details": {
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0,
|
|
"reasoning_tokens": 2
|
|
},
|
|
"input_tokens": 10,
|
|
"output_tokens": 5,
|
|
"input_tokens_details": {
|
|
"cached_tokens": 3,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
},
|
|
"user": null,
|
|
"metadata": null
|
|
}
|