@heungtae/codex-chat-bridge 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/USAGE.md +12 -1
- package/package.json +1 -1
- package/scripts/run_codex_with_bridge.sh +2 -4
- package/src/main.rs +2 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm install -g @heungtae/codex-chat-bridge
|
|
|
26
26
|
- Translates request payload into `POST /v1/chat/completions`
|
|
27
27
|
- Streams upstream Chat Completions chunks back as Responses-style SSE events:
|
|
28
28
|
- `response.created`
|
|
29
|
-
- `response.output_item.added` (assistant
|
|
29
|
+
- `response.output_item.added` (assistant text starts; only emitted when text delta exists)
|
|
30
30
|
- `response.output_text.delta`
|
|
31
31
|
- `response.output_item.done` (assistant message and function calls)
|
|
32
32
|
- `response.completed`
|
|
@@ -73,6 +73,11 @@ Use `scripts/run_codex_with_bridge.sh` to run the bridge and `codex exec` togeth
|
|
|
73
73
|
scripts/run_codex_with_bridge.sh "Summarize this repo."
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
Defaults:
|
|
77
|
+
- `API_KEY_ENV=OPENAI_API_KEY`
|
|
78
|
+
- `UPSTREAM_URL=https://api.openai.com/v1/chat/completions`
|
|
79
|
+
- The script does not force `model`; pass it as extra args when needed (for example: `--model gpt-4.1`).
|
|
80
|
+
|
|
76
81
|
## Package Scripts
|
|
77
82
|
|
|
78
83
|
```bash
|
package/USAGE.md
CHANGED
|
@@ -9,7 +9,13 @@ npm install @heungtae/codex-chat-bridge
|
|
|
9
9
|
npx @heungtae/codex-chat-bridge --help
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
공개 npm 배포(현재 기본값):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm publish --access public
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
private registry 배포(선택):
|
|
13
19
|
|
|
14
20
|
```bash
|
|
15
21
|
npm publish --registry <private-registry> --access restricted
|
|
@@ -134,6 +140,11 @@ codex exec '간단한 테스트를 해줘'
|
|
|
134
140
|
scripts/run_codex_with_bridge.sh "이 저장소 구조를 설명해줘"
|
|
135
141
|
```
|
|
136
142
|
|
|
143
|
+
기본값:
|
|
144
|
+
- `API_KEY_ENV=OPENAI_API_KEY`
|
|
145
|
+
- `UPSTREAM_URL=https://api.openai.com/v1/chat/completions`
|
|
146
|
+
- 래퍼 스크립트는 `model`을 강제하지 않음 (필요 시 추가 인자로 전달)
|
|
147
|
+
|
|
137
148
|
추가 인자 전달:
|
|
138
149
|
|
|
139
150
|
```bash
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ fi
|
|
|
9
9
|
PROMPT="$1"
|
|
10
10
|
shift || true
|
|
11
11
|
|
|
12
|
-
API_KEY_ENV="${API_KEY_ENV:-
|
|
13
|
-
UPSTREAM_URL="${UPSTREAM_URL:-https://
|
|
12
|
+
API_KEY_ENV="${API_KEY_ENV:-OPENAI_API_KEY}"
|
|
13
|
+
UPSTREAM_URL="${UPSTREAM_URL:-https://api.openai.com/v1/chat/completions}"
|
|
14
14
|
BRIDGE_PORT="${BRIDGE_PORT:-8787}"
|
|
15
15
|
SERVER_INFO="${SERVER_INFO:-/tmp/codex-chat-bridge-info.json}"
|
|
16
16
|
CODEX_BRIDGE_RUST_LOG="${CODEX_BRIDGE_RUST_LOG:-${RUST_LOG:-info,codex_core::rollout::list=off}}"
|
|
@@ -42,6 +42,4 @@ done
|
|
|
42
42
|
RUST_LOG="${CODEX_BRIDGE_RUST_LOG}" codex exec \
|
|
43
43
|
-c "model_providers.chat-bridge={name='Chat Bridge',base_url='http://127.0.0.1:${BRIDGE_PORT}/v1',env_key='${API_KEY_ENV}',wire_api='responses'}" \
|
|
44
44
|
-c 'model_provider="chat-bridge"' \
|
|
45
|
-
-c 'model="arcee-ai/trinity-large-preview:free"' \
|
|
46
|
-
-c 'web_search="disabled"' \
|
|
47
45
|
"$PROMPT" "$@"
|
package/src/main.rs
CHANGED