Codex commited on
Commit ·
fd5f165
1
Parent(s): e15b1ad
Disable Codex compatibility patches
Browse files- Dockerfile +3 -13
- README.md +2 -11
Dockerfile
CHANGED
|
@@ -2,13 +2,6 @@ FROM alpine:3.22 AS source
|
|
| 2 |
|
| 3 |
RUN apk add --no-cache git
|
| 4 |
RUN git clone --depth 1 --branch v1.0.0-rc.22 https://github.com/QuantumNous/new-api.git /src
|
| 5 |
-
COPY image_url_compat.go image_url_compat_test.go image_task_compat.go image_task_compat_test.go /src/relay/channel/openai/
|
| 6 |
-
COPY codex-image-b64.patch /tmp/codex-image-b64.patch
|
| 7 |
-
COPY codex-luna-compat.patch /tmp/codex-luna-compat.patch
|
| 8 |
-
RUN git -C /src apply --check /tmp/codex-image-b64.patch \
|
| 9 |
-
&& git -C /src apply /tmp/codex-image-b64.patch \
|
| 10 |
-
&& git -C /src apply --check /tmp/codex-luna-compat.patch \
|
| 11 |
-
&& git -C /src apply /tmp/codex-luna-compat.patch
|
| 12 |
|
| 13 |
FROM oven/bun:1 AS web-builder
|
| 14 |
|
|
@@ -17,7 +10,7 @@ COPY --from=source /src/web/package.json /src/web/bun.lock ./
|
|
| 17 |
RUN bun install --frozen-lockfile
|
| 18 |
COPY --from=source /src/web ./
|
| 19 |
COPY --from=source /src/VERSION /build/VERSION
|
| 20 |
-
RUN DISABLE_ESLINT_PLUGIN=true VITE_REACT_APP_VERSION=v1.0.0-rc.22
|
| 21 |
|
| 22 |
FROM golang:1.26.1-alpine AS go-builder
|
| 23 |
|
|
@@ -31,7 +24,7 @@ RUN go test ./relay/channel/openai \
|
|
| 31 |
./relay \
|
| 32 |
./relay/channel/gemini \
|
| 33 |
./service/relayconvert/internal/oai_chat \
|
| 34 |
-
&& go build -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=v1.0.0-rc.22
|
| 35 |
|
| 36 |
FROM debian:bookworm-slim
|
| 37 |
|
|
@@ -45,10 +38,7 @@ RUN apt-get update \
|
|
| 45 |
COPY --from=go-builder /build/new-api /new-api
|
| 46 |
COPY --from=source /src/LICENSE /src/NOTICE /src/THIRD-PARTY-LICENSES.md /licenses/
|
| 47 |
ENV PORT=7860 \
|
| 48 |
-
VERSION=v1.0.0-rc.22
|
| 49 |
-
CODEX_IMAGE_URL_TO_B64=true \
|
| 50 |
-
CODEX_IMAGE_TASK_POLL=true \
|
| 51 |
-
CODEX_IMAGE_TASK_POLL_TIMEOUT_SECONDS=120
|
| 52 |
EXPOSE 7860
|
| 53 |
WORKDIR /data
|
| 54 |
USER root
|
|
|
|
| 2 |
|
| 3 |
RUN apk add --no-cache git
|
| 4 |
RUN git clone --depth 1 --branch v1.0.0-rc.22 https://github.com/QuantumNous/new-api.git /src
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
FROM oven/bun:1 AS web-builder
|
| 7 |
|
|
|
|
| 10 |
RUN bun install --frozen-lockfile
|
| 11 |
COPY --from=source /src/web ./
|
| 12 |
COPY --from=source /src/VERSION /build/VERSION
|
| 13 |
+
RUN DISABLE_ESLINT_PLUGIN=true VITE_REACT_APP_VERSION=v1.0.0-rc.22 bun run build
|
| 14 |
|
| 15 |
FROM golang:1.26.1-alpine AS go-builder
|
| 16 |
|
|
|
|
| 24 |
./relay \
|
| 25 |
./relay/channel/gemini \
|
| 26 |
./service/relayconvert/internal/oai_chat \
|
| 27 |
+
&& go build -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=v1.0.0-rc.22'" -o new-api
|
| 28 |
|
| 29 |
FROM debian:bookworm-slim
|
| 30 |
|
|
|
|
| 38 |
COPY --from=go-builder /build/new-api /new-api
|
| 39 |
COPY --from=source /src/LICENSE /src/NOTICE /src/THIRD-PARTY-LICENSES.md /licenses/
|
| 40 |
ENV PORT=7860 \
|
| 41 |
+
VERSION=v1.0.0-rc.22
|
|
|
|
|
|
|
|
|
|
| 42 |
EXPOSE 7860
|
| 43 |
WORKDIR /data
|
| 44 |
USER root
|
README.md
CHANGED
|
@@ -10,14 +10,5 @@ license: mit
|
|
| 10 |
|
| 11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 12 |
|
| 13 |
-
This Space
|
| 14 |
-
|
| 15 |
-
- asynchronous `202 image.task` responses are polled for up to 120 seconds;
|
| 16 |
-
- final image URLs are converted to `b64_json`;
|
| 17 |
-
- transient image download errors and upstream 5xx responses are retried up to three times without resubmitting the generation task.
|
| 18 |
-
|
| 19 |
-
It also includes a Codex Luna compatibility layer:
|
| 20 |
-
|
| 21 |
-
- `gpt-5.6-luna` is always routed to `gemini-3.7-flash-high`;
|
| 22 |
-
- Codex reasoning effort and summary fields are ignored for the Luna alias;
|
| 23 |
-
- incomplete Responses SSE streams are normalized with output/content indexes and content-part lifecycle events required by Codex.
|
|
|
|
| 10 |
|
| 11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 12 |
|
| 13 |
+
This Space builds the upstream New API `v1.0.0-rc.22` without the previously added
|
| 14 |
+
Codex image or Luna compatibility patches.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|