# Complete - m-seulgivibe-openai-compatible-provider/03+01,02_responses_passthrough

## 완료 일시

2026-07-11

## 요약

Seulgivibe OpenAI-compatible Provider 연동의 `/v1/responses` provider passthrough subtask를 3회 리뷰 루프 끝에 PASS로 종료했다.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | Responses provider passthrough 기본 구현 뒤 success usage label과 contract/spec sync가 부족했다. |
| `plan_cloud_G07_1.log` | `code_review_cloud_G07_1.log` | FAIL | Responses usage regression이 실제 Node tunnel relay와 다른 proto `USAGE` frame에 의존했다. |
| `plan_local_G05_2.log` | `code_review_local_G05_2.log` | PASS | Body-only Responses JSON/SSE usage observation, endpoint=`responses` metrics, regression tests가 충족됐다. |

## 구현/정리 내용

- `/v1/responses` provider raw passthrough가 strict normalized parser를 우회해 provider `POST /v1/responses`로 전달되고, model rewrite 외 unknown/Codex fields와 streaming SSE를 보존한다.
- Responses passthrough success metrics가 endpoint=`responses`, response_mode=`passthrough`/`passthrough+sideband`, model_group=request alias로 기록되게 정리했다.
- Provider body-only Responses JSON/SSE의 `usage.input_tokens`/`usage.output_tokens`와 detail token을 Edge writer가 provider-reported usage metrics로 관측하게 했다.
- OpenAI-compatible contract와 matching agent-spec을 Responses provider raw passthrough behavior에 맞게 동기화했다.
- Node `openai_compat` tunnel이 `/v1/responses` path를 provider body-only `BODY`/`END` frames로 relay하는 테스트 evidence를 보강했다.

## 최종 검증

- `GOCACHE=/tmp/iop-gocache go test ./apps/edge/internal/openai -run 'TestResponsesProviderTunnelPassthroughObservesUsageMetrics|TestResponsesProviderTunnelPassthroughStreamingObservesUsageMetrics|TestProviderTunnelPassthroughPreservesBodyAndObservesUsage' -count=1` - PASS; `ok iop/apps/edge/internal/openai 0.010s`.
- `GOCACHE=/tmp/iop-gocache go test ./apps/edge/internal/openai -count=1` - PASS; `ok iop/apps/edge/internal/openai 1.833s`.
- `GOCACHE=/tmp/iop-gocache go test ./apps/edge/... -count=1` - PASS; Edge packages all passed, including `apps/edge/internal/openai 1.833s` and `apps/edge/internal/transport 2.038s`.
- `GOCACHE=/tmp/iop-gocache go test ./apps/node/internal/adapters/openai_compat -count=1` - PASS; `ok iop/apps/node/internal/adapters/openai_compat 0.123s`.
- `if rg --sort path -n 'raw passthrough parity가 구현되기 전까지|raw passthrough parity 전까지 지원하지 않는다|provider model group raw passthrough parity 전까지' agent-contract/outer/openai-compatible-api.md agent-spec/input/openai-compatible-surface.md; then exit 1; fi` - PASS; no stale unsupported text matched.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/routing-policy-model-orchestration/milestones/seulgivibe-openai-compatible-provider.md`
- Milestone link: [Milestone 문서](agent-roadmap/phase/routing-policy-model-orchestration/milestones/seulgivibe-openai-compatible-provider.md)
- Completed task ids:
  - `responses-passthrough`: PASS; evidence=`agent-task/archive/2026/07/m-seulgivibe-openai-compatible-provider/03+01,02_responses_passthrough/plan_local_G05_2.log`, `agent-task/archive/2026/07/m-seulgivibe-openai-compatible-provider/03+01,02_responses_passthrough/code_review_local_G05_2.log`; verification=`GOCACHE=/tmp/iop-gocache go test ./apps/edge/internal/openai -count=1`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
