ccproxy.llms.formatters.common.identifiers¶
ccproxy.llms.formatters.common.identifiers
¶
Identifier helpers shared across formatter adapters.
normalize_suffix
¶
Return the suffix part of an identifier split on the first underscore.
ensure_identifier
¶
Return a stable identifier and suffix for the given prefix.
If an existing identifier already matches the prefix we reuse its suffix.
Existing identifiers that begin with resp_ are also understood so both
resp and alternate prefixes can build consistent derived identifiers.
Source code in ccproxy/llms/formatters/common/identifiers.py
ensure_responses_function_call_identifiers
¶
Return OpenAI Responses-compatible function-call item and call IDs.
Responses function-call output items use an fc_* item id. The model call
correlation id remains a distinct call_* value and is reused by
function_call_output input items on subsequent turns.
Source code in ccproxy/llms/formatters/common/identifiers.py
normalize_responses_function_call_ids
¶
Normalize Responses function-call ids in a JSON-like payload.
This intentionally skips function_call_output entries; they are input
items carrying user code output and should keep their own item identifiers.
Source code in ccproxy/llms/formatters/common/identifiers.py
normalize_responses_sse_event_bytes
¶
Normalize a complete SSE event carrying a Responses JSON payload.