Repository navigation
Provider 4xx 거절 이유를 화면에 표시 (ADR-0093) - #164
Merged
Merged
Conversation
provider가 요청을 거절하면 지금까지는 provider_rejected·request_rejected 같은 class만 보여서
잘못된 key, 모델 ID 오타, 지원하지 않는 파라미터를 구분할 수 없었다.
- xgen-provider-openai: 4xx 본문을 최대 16 KiB 읽어 ProviderRejection{status,kind,code,message}로 요약
- 형식 7종: OpenAI error 객체, Google 목록, Ollama 문자열, vLLM 최상위 message, FastAPI detail 등
- 보낸 key, Bearer 다음 단어, sk-/AIza 등 접두사, 24자 이상 혼합 token, 32자 이상 hex, 방향 전환 문자를 지움
- message 300자, type/code 64자 제한
- planner는 with_rejection_observer, checker는 take_provider_rejection으로만 전달
- xgen-cli: Run이 provider 측 거절로 끝나면 결과에 요약을 붙임
- headless는 provider:/recovery: 줄, 대화형은 Provider said: 줄 출력
- 안내는 상태 코드별(401/403 key, 404 model ID, 429 한도, 나머지 메시지 우선)
- model check/setup에 provider: 줄 추가, compatibility probe의 401/403을 authentication_rejected로 분류
- journal, planning context, model 요청은 그대로(모델 요청 비교 8/8 일치)
검증
- 가짜 key 실측: 설계 2곳 + 설계에 쓰지 않은 9곳 모두 이유 표시
- Mistral FastAPI detail과 OpenAI가 가린 key의 앞부분은 처음에 빈틈이 있어 고침
- headless Run 3곳, tmux 대화형(400 mock)에서 표시 확인, Run 상태 폴더에 메시지 없음
- Rust 826 통과(4 ignored), Python 192(62 skip), TUI smoke 3개와 first-use smoke 통과
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SonAIengine
added a commit
that referenced
this pull request
Nov 28, 2026
- Cargo·npm 패키지 버전 0.1.0-rc.9 → 0.1.0-rc.10 (10개 파일, Cargo.lock 11개 crate, npm lock) - README·getting-started·npm README의 설치 예시를 rc.10으로 바꿈 - check-third-party-licenses --write로 고지 갱신 - 포함 변경: #164 provider 거절 이유 표시(ADR-0093), #165 백그라운드 Run(ADR-0094) - release preflight PASS, npm 테스트 20개 통과, 공개 문서·workflow 계약 검사 통과 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
provider가 요청을 4xx로 거절하면 지금까지는
provider_rejected나request_rejected같은 class만 보였다. 이 PR은 provider가 보낸 이유를 정리해 화면에 보여 준다(A안: 화면 전용, journal은 그대로).ProviderRejection{status, kind, code, message}로 요약한다.detail(문자열과 검증 목록)을 포함한다.Bearer다음 단어,sk-/AIza같은 접두사 token(provider가 가려서 돌려준 key 포함), 24자 이상 대소문자·숫자 혼합 token, 32자 이상 hex, 보이지 않는/방향 전환 문자.LocalCommandResult::Rejected.provider에 요약을 붙인다.provider:와recovery:줄을, 대화형은Provider said:줄과 안내를 출력한다.provider:줄을 추가했다. compatibility probe가 401/403을 받으면authentication_rejected(exit 77)로 분류한다.검증
scripts/diff-model-requests.py --base <rc.9 binary> --head target/debug/xgen결과 8개 사례 모두 차이 0,model requests match.model check):detail)의 이유가 비어 있었고, OpenAI가 가려서 돌려준 key의 앞 8자가 남아 있었다. 둘 다 고쳤다.XGEN_REJECTED아래에 provider 줄이 나온다. Run 상태 폴더에서 provider 메시지는 0건 검색됐다.Provider said:와 안내가 표시된다.-D warnings와 fmt 통과.agy 연결의 거절은 이번 범위에 넣지 않았다.
🤖 Generated with Claude Code