MCPcopy Create free account

hub / github.com/CAZAMA1/Codex-app-with-deepseek-perfectly / functions

Functions63 in github.com/CAZAMA1/Codex-app-with-deepseek-perfectly

↓ 13 callersFunctionto_chat_request
Convert a Responses API request + prior history into a Chat Completions request.
codex-relay/src/translate.rs:6
↓ 7 callersFunctionbase_req
(input: ResponsesInput)
codex-relay/src/translate.rs:239
↓ 7 callersMethodstore_turn_reasoning
Store reasoning_content for an assistant turn, keyed by a fingerprint of the assistant message content and tool calls.
codex-relay/src/session.rs:52
↓ 5 callersFunctionbase_req
(input: ResponsesInput)
codex-relay/tests/compat_deepseek_v4_pro.rs:14
↓ 4 callersMethodstore_reasoning
Store reasoning_content keyed by the tool call_id so it can be injected back when the same call_id appears in a subsequent request.
codex-relay/src/session.rs:39
↓ 4 callersFunctionvalidate_upstream
Validate that `--upstream` is an acceptable HTTP(S) URL.
codex-relay/src/main.rs:82
↓ 3 callersFunctionassistant_msg
(content: &str)
codex-relay/tests/compat_deepseek_v4_pro.rs:28
↓ 3 callersFunctionmsg
(role: &str, content: Option<&str>)
codex-relay/src/session.rs:123
↓ 3 callersMethodnew_id
Allocate a fresh response_id without storing anything yet. Use with save_with_id() for the streaming path.
codex-relay/src/session.rs:101
↓ 2 callersFunctionconvert_tool
Responses API tool format → Chat Completions tool format. Responses API (flat): {"type":"function","name":"foo","description":"...","parameters":{...
codex-relay/src/translate.rs:154
↓ 2 callersMethodget_history
Retrieve history for a prior response_id, or empty vec if not found.
codex-relay/src/session.rs:92
↓ 2 callersMethodget_turn_reasoning
Look up reasoning_content for an assistant turn by its text content.
codex-relay/src/session.rs:75
↓ 2 callersMethodsave
Allocate an id and store atomically (non-streaming path).
codex-relay/src/session.rs:111
↓ 1 callersFunction_find_binary
()
codex-relay/codex_relay/__init__.py:14
↓ 1 callersFunctionassistant_msg_with_tool_calls
(content: &str, tool_calls: Vec<serde_json::Value>)
codex-relay/tests/compat_deepseek_v4_pro.rs:39
↓ 1 callersFunctionfrom_chat_response
Convert a Chat Completions response into a Responses API response.
codex-relay/src/translate.rs:175
↓ 1 callersMethodget_reasoning
Look up stored reasoning_content for a call_id.
codex-relay/src/session.rs:46
↓ 1 callersFunctionhandle_blocking
( state: AppState, chat_req: types::ChatRequest, url: String, model: String, )
codex-relay/src/main.rs:189
↓ 1 callersFunctionhandle_responses_inner
( state: AppState, req: ResponsesRequest, )
codex-relay/src/main.rs:153
↓ 1 callersMethodsave_with_id
Store under a pre-allocated response_id (streaming path).
codex-relay/src/session.rs:106
↓ 1 callersFunctiontranslate_stream
Translate an upstream Chat Completions SSE stream into a Responses API SSE stream. Text response event sequence: response.created → response.output_i
codex-relay/src/stream.rs:48
↓ 1 callersFunctionvalue_to_text
Collapse a Responses API content value (string or parts array) to plain text.
codex-relay/src/translate.rs:221
Methodcontent_key
Hash assistant message content for turn-level reasoning lookup.
codex-relay/src/session.rs:85
Methoddo_GET
(self)
model-proxy.py:91
Methoddo_POST
(self)
model-proxy.py:49
Methoddo_request
(self, method)
model-proxy.py:20
Functionhandle_fallback
Catch-all: log unknown requests so we can see what Codex is sending.
codex-relay/src/main.rs:129
Functionhandle_models
GET /v1/models — proxy to upstream so Codex gets real model metadata.
codex-relay/src/main.rs:100
Functionhandle_responses
( State(state): State<AppState>, body: axum::body::Bytes, )
codex-relay/src/main.rs:134
Functionjoin_base
(url: &Url)
codex-relay/src/main.rs:94
Functionmain
()
codex-relay/src/main.rs:47
Methodnew
()
codex-relay/src/session.rs:29
Functionstart
Start codex-relay as a background process and return the Popen handle.
codex-relay/codex_relay/__init__.py:28
Functiontest_content_key_deterministic
()
codex-relay/src/session.rs:202
Functiontest_convert_tool_already_nested
()
codex-relay/src/translate.rs:327
Functiontest_convert_tool_flat_to_nested
()
codex-relay/src/translate.rs:313
Functiontest_deepseek_v4_pro_multi_turn_reasoning
()
codex-relay/tests/compat_deepseek_v4_pro.rs:145
Functiontest_deepseek_v4_pro_reasoning_roundtrip_text_only
()
codex-relay/tests/compat_deepseek_v4_pro.rs:53
Functiontest_deepseek_v4_pro_reasoning_roundtrip_with_tool_calls
()
codex-relay/tests/compat_deepseek_v4_pro.rs:87
Functiontest_developer_role_mapped_to_system
()
codex-relay/src/translate.rs:274
Functiontest_empty_reasoning_not_stored
()
codex-relay/src/session.rs:148
Functiontest_function_call_grouping
()
codex-relay/src/translate.rs:285
Functiontest_function_call_output_becomes_tool_message
()
codex-relay/src/translate.rs:301
Functiontest_get_reasoning_missing
()
codex-relay/src/session.rs:142
Functiontest_history_save_and_get
()
codex-relay/src/session.rs:187
Functiontest_join_base_adds_trailing_slash
()
codex-relay/src/main.rs:289
Functiontest_join_base_preserves_trailing_slash
()
codex-relay/src/main.rs:295
Functiontest_kimi_k2_6_reasoning_via_call_id
()
codex-relay/tests/compat_deepseek_v4_pro.rs:217
Functiontest_non_thinking_model_no_reasoning_content
()
codex-relay/tests/compat_deepseek_v4_pro.rs:191
Functiontest_store_and_get_reasoning
()
codex-relay/src/session.rs:135
Functiontest_system_prompt_from_instructions
()
codex-relay/src/translate.rs:264
Functiontest_text_input_becomes_user_message
()
codex-relay/src/translate.rs:254
Functiontest_turn_reasoning_also_stores_call_ids
()
codex-relay/src/session.rs:174
Functiontest_turn_reasoning_by_content
()
codex-relay/src/session.rs:155
Functiontest_turn_reasoning_empty_content
()
codex-relay/src/session.rs:166
Functiontest_validate_upstream_http_localhost
()
codex-relay/src/main.rs:261
Functiontest_validate_upstream_https
()
codex-relay/src/main.rs:254
Functiontest_validate_upstream_rejects_file
()
codex-relay/src/main.rs:273
Functiontest_validate_upstream_rejects_ftp
()
codex-relay/src/main.rs:268
Functiontest_validate_upstream_rejects_garbage
()
codex-relay/src/main.rs:278
Functiontest_validate_upstream_trailing_slash_stripped
()
codex-relay/src/main.rs:283
Functiontest_value_to_text_parts_array
()
codex-relay/src/translate.rs:347
Functiontest_value_to_text_string
()
codex-relay/src/translate.rs:337