설정 레퍼런스
opencodex는 ~/.opencodex/config.json으로 설정됩니다. 이 파일은 ocx init과 대시보드가
작성하지만, 직접 편집할 수도 있습니다. 프록시는 시작 시 이 파일을 다시 읽습니다. 파일이 없거나
유효하지 않으면 기본값(단일 openai 포워드 프로바이더)으로 폴백합니다.
최상위 (OcxConfig)
섹션 제목: “최상위 (OcxConfig)”| Field | Type | Default | Meaning |
|---|---|---|---|
port | number | 10100 | 프록시가 수신 대기하는 포트. |
providers | Record<string, OcxProviderConfig> | — | 프로바이더 이름 → 설정 맵. |
defaultProvider | string | "openai" | 라우팅에서 더 나은 매치를 찾지 못했을 때 사용하는 프로바이더. |
subagentModels? | string[] | — | Codex의 서브에이전트 선택기에서 가장 먼저 노출되는 최대 5개의 provider/model id. |
disabledModels? | string[] | — | Codex에서 숨겨지는 라우팅된 provider/model id (카탈로그와 /v1/models에서 제외됨). |
websockets? | boolean | false | Codex가 Responses WebSocket 경로를 사용하도록 supports_websockets를 광고합니다. 생략하거나 false로 두면 HTTP/SSE를 유지합니다. |
modelCacheTtlMs? | number | 300000 | 프로바이더별 /models 캐시의 유효 기간 (5분). |
webSearchSidecar? | OcxWebSearchSidecarConfig | on | 웹 검색 사이드카 옵션 (아래 참조). |
visionSidecar? | OcxVisionSidecarConfig | on | 비전 사이드카 옵션 (아래 참조). |
프로바이더 (OcxProviderConfig)
섹션 제목: “프로바이더 (OcxProviderConfig)”| Field | Type | Meaning |
|---|---|---|
adapter | string | openai-chat, openai-responses, anthropic, google, azure 중 하나. |
baseUrl | string | 업스트림 API 기본 URL. |
apiKey? | string | API 키, 또는 요청 시점에 해석되는 ${ENV_VAR} / $ENV_VAR 참조. |
defaultModel? | string | 명시적인 모델 없이 이 프로바이더가 선택되었을 때 사용하는 모델. |
models? | string[] | 시드/폴백 모델 목록 (실시간 /models에 접근 가능하면 그쪽이 우선됨). |
headers? | Record<string,string> | 업스트림으로 전송되는 추가 HTTP 헤더. |
authMode? | "key" | "forward" | "oauth" | 인증 방식 (기본 key). 프로바이더 참조. |
noReasoningModels? | string[] | reasoning/thinking 파라미터를 거부하는 모델 — 어댑터가 이들에 대해 reasoning_effort를 제거함. |
noVisionModels? | string[] | 텍스트 전용 모델 — 비전 사이드카가 이들을 위해 이미지를 설명함. 매칭 시 Ollama의 :size 태그를 허용함. |
사이드카
섹션 제목: “사이드카”webSearchSidecar (OcxWebSearchSidecarConfig)
섹션 제목: “webSearchSidecar (OcxWebSearchSidecarConfig)”| Field | Type | Default | Meaning |
|---|---|---|---|
enabled? | boolean | 포워드 프로바이더 + 로그인이 존재할 때 on | 메인 스위치. |
model? | string | gpt-5.4-mini | 실제 web_search를 실행하는 사이드카 모델 (네이티브 ChatGPT 모델이어야 함). |
reasoning? | string | low | 사이드카의 reasoning effort (minimal은 웹 검색과 함께 거부됨). |
maxSearchesPerTurn? | number | 3 | 메인 모델 턴당 실제 검색의 총 횟수 (루프 가드). |
timeoutMs? | number | 30000 | 사이드카 fetch 타임아웃. |
visionSidecar (OcxVisionSidecarConfig)
섹션 제목: “visionSidecar (OcxVisionSidecarConfig)”| Field | Type | Default | Meaning |
|---|---|---|---|
enabled? | boolean | 포워드 프로바이더 + 로그인이 존재할 때 on | 메인 스위치. |
model? | string | gpt-5.4-mini | 이미지를 설명하는 비전 모델 (이미지 입력을 받아들여야 함). |
timeoutMs? | number | 45000 | 사이드카 fetch 타임아웃. |
전체 예시
섹션 제목: “전체 예시”{ "port": 10100, "defaultProvider": "openai", "providers": { "openai": { "adapter": "openai-responses", "baseUrl": "https://chatgpt.com/backend-api/codex", "authMode": "forward" }, "anthropic": { "adapter": "anthropic", "baseUrl": "https://api.anthropic.com", "authMode": "oauth", "defaultModel": "claude-sonnet-4-6" }, "ollama-cloud": { "adapter": "openai-chat", "baseUrl": "https://ollama.com/v1", "apiKey": "${OLLAMA_API_KEY}", "defaultModel": "glm-5.2", "noVisionModels": ["glm-5.2", "gpt-oss", "qwen3-coder", "deepseek-v4-pro"] } }, "subagentModels": ["anthropic/claude-opus-4-8", "ollama-cloud/glm-5.2"], "disabledModels": [], "websockets": false, "webSearchSidecar": { "maxSearchesPerTurn": 3 }, "visionSidecar": { "enabled": true }}