Skip to content

Conversation

@hxcva1
Copy link
Contributor

@hxcva1 hxcva1 commented Oct 8, 2025

Purpose

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] New feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

README updated?

The top-level readme for this repo contains a link to each sample in the repo. If you're adding a new sample did you update the readme?

[x] Yes
[ ] No
[ ] N/A

What to Check

Verify that the following are valid

  • Required Parameters: ApiKey, Model

@tae0y
Copy link
Member

tae0y commented Oct 9, 2025

오셨군요! 내용 확인해보겠습니다 ~

@tae0y
Copy link
Member

tae0y commented Oct 9, 2025

리뷰 진행상황

  • replacement of feat: add Google Vertex AI connector implementation #454
  • 지난 PR에서 논의/확인했던 사항
    • GeminiChatClient 사용해서 Connector 구현
    • 테스트 시나리오 커버리지
      • GoogleVertexAIConnector가 LanguageModelConnector를 상속하는지에 대한 테스트
      • Connector 로직 테스트
        • EnsureLanguageModelSettingsValid()
        • GetChatClientAsync()
        • LanguageModelConnector.CreateChatClientAsync()
        • 예외발생 테스트 컨벤션 Tests are NOT testing exceptions #451
        • 하드코딩된 magic string 상수화
      • 경계값 테스트
      • LanguageModelConnector.cs case문에서 LLM Provider 지원순서를 지키기

리뷰 백로그 / 기타 메모

  • 그래서 이 커넥터는 잘 동작하는가 ...
  • 문서 : 호스트머신, 컨테이너 부분
  • Bicep 구현
  • 문서 : Bicep/Azure 부분

@tae0y
Copy link
Member

tae0y commented Oct 9, 2025

test/OpenChat.PlaygroundApp.Tests/Connectors/GoogleVertexAIConnectorTests.cs 테스트 시나리오 정리

  • Given_Settings_Is_Null_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Thro
    • GoogleVertexAI 설정이 null일 때 EnsureLanguageModelSettingsValid 호출 시 예외가 발생해야 함
  • Given_Invalid_ApiKey_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Thro
    • ApiKey가 null, 빈 문자열, 공백만 있을 때 EnsureLanguageModelSettingsValid 호출 시 예외가 발생해야 함
  • Given_Invalid_Model_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Thro
    • Model이 null, 빈 문자열, 공백만 있을 때 EnsureLanguageModelSettingsValid 호출 시 예외가 발생해야 함
  • Given_Valid_Settings_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Return_Tru
    • 올바른 설정이 주어졌을 때 EnsureLanguageModelSettingsValid 호출 시 true를 반환해야 함
  • Given_Valid_Settings_When_GetChatClient_Invoked_Then_It_Should_Return_ChatClien
    • 올바른 설정이 주어졌을 때 GetChatClientAsync 호출 시 ChatClient가 반환되어야 함
  • Given_Settings_Is_Null_When_GetChatClientAsync_Invoked_Then_It_Should_Thro
    • GoogleVertexAI 설정이 null일 때 GetChatClientAsync 호출 시 예외가 발생해야 함
  • Given_Missing_ApiKey_When_GetChatClient_Invoked_Then_It_Should_Thro
    • ApiKey가 null 또는 빈 문자열일 때 GetChatClientAsync 호출 시 예외가 발생해야 함
  • Given_Missing_Model_When_GetChatClient_Invoked_Then_It_Should_Thro
    • Model이 null일 때 GetChatClientAsync 호출 시 예외가 발생해야 함
  • Given_Valid_Settings_When_CreateChatClientAsync_Invoked_Then_It_Should_Return_ChatClien
    • 올바른 설정이 주어졌을 때 LanguageModelConnector.CreateChatClientAsync 호출 시 IChatClient가 반환되어야 함
  • Given_Invalid_Settings_When_CreateChatClientAsync_Invoked_Then_It_Should_Thro
    • 잘못된 설정(예: ApiKey가 null)이 주어졌을 때 LanguageModelConnector.CreateChatClientAsync 호출 시 예외가 발생해야 함

Copy link
Member

@tae0y tae0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10/9 변경 요청사항

  • 아래 LanguageModelConnectorTests에서 GoogleVertexAIConnector 구문 각주해제
    • test/OpenChat.PlaygroundApp.Tests/Abstractions/LanguageModelConnectorTests.cs
    • GoogleVertexAIConnector가 LanguageModelConnector를 잘 상속하는지 테스트
    • 관련내용은 이 이슈 참조 #423

그리고 Connector로직과 테스트가 어느정도 정리되었으니 문서로 넘어가시죠!

  • PR본문 정리 : 불필요한 부분은 남겨두지 마시고 삭제해주세요
  • docs 디렉토리 아래에 googlevertexai 문서화해주세요
    • docs/openai, docs/huggingface를 참고해서 작성하시면 됩니다
    • 다른 분들 PR에서 자주 언급됐던 부분을 공유드리면
      • bash/powershell로 구분하여 샘플을 작성해주세요
      • bash 명령어에서 강제개행은 / 역슬래시, powershell은 ` 백틱을 사용합니다
      • docker 컨테이너를 말 때 Github container registry에서 이미지 가져오는 샘플도 작성해주세요
  • 그밖에 리포지토리 루트, docs 루트에 있는 README 수정이 필요합니다

@hxcva1
Copy link
Contributor Author

hxcva1 commented Oct 9, 2025

피드백 주신 부분 하나씩 수정하면서 코멘트 남기겠습니다!

@hxcva1
Copy link
Contributor Author

hxcva1 commented Oct 10, 2025

우선 PR 본문 정리했습니다!

@hxcva1
Copy link
Contributor Author

hxcva1 commented Oct 10, 2025

test/OpenChat.PlaygroundApp.Tests/Abstractions/LanguageModelConnectorTests.cs 부분 주석 해제 했습니다!

Copy link
Member

@tae0y tae0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10/10 수정요청입니다 LanguageModelConnector 상속 테스트는 잘 확인했습니다!

  • 테스트 메서드에서 불필요한 매개인자 제거하기
  • 지난번 요청한 문서작업

@justinyoo
Copy link
Contributor

@hxcva1 #494 PR이 머지가 됐으므로 테스트 코드는 이를 참고해서 작성해 주세욥! 촘촘하게 작성하셔야 합니다.

Copy link
Member

@tae0y tae0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생많으셨습니다! ㅎㅎ
문서 스타일을 맞추고, API KEY 발급시 참고할 문서 링크를 추가해주세요.

@tae0y
Copy link
Member

tae0y commented Oct 18, 2025

@hxcva1 잘 지내시죠? 진행상황 업데이트 부탁드립니다
기한이 있어서 필요하면 저도 같이 작업 진행해볼게요

@hxcva1
Copy link
Contributor Author

hxcva1 commented Oct 19, 2025

그러면 저는 우선 테스트 코드 보완 부터 시도해보도록 하겠습니다

@hxcva1
Copy link
Contributor Author

hxcva1 commented Oct 21, 2025

Github 상에서 Conflict 해결하고 커밋을 했는데 로컬에서 이 버전을 pull 안하고 작업한 내용을 커밋했는데 푸쉬하려고 하니 에러가 나서 어떻게 해야할까요? rebase 기능을 사용해도 되는지 git이 아직 완전히 익숙하지는 않아서 죄송합니다.

@sikutisa
Copy link
Contributor

Github 상에서 Conflict 해결하고 커밋을 했는데 로컬에서 이 버전을 pull 안하고 작업한 내용을 커밋했는데 푸쉬하려고 하니 에러가 나서 어떻게 해야할까요? rebase 기능을 사용해도 되는지 git이 아직 완전히 익숙하지는 않아서 죄송합니다.

git pull 해보셨나요?
git fetch & git rebase origin/<branch명> 하셔도 되겠지만, 그냥 git pull 하셔도 됩니다.

conflict 발생하면 로컬에서 수정하고 commit & push 하시면 됩니다.

@sikutisa
Copy link
Contributor

@hxcva1 CI 터지는 테스트 고쳐주세요

hxcva1 and others added 5 commits October 27, 2025 22:04
- 순번있는 항목 내부의 코드와 각주는 인덴트
- 문서 컨벤션 반영
- GitHub Container Regitry, default and alternative model configuration
- 프로젝트, docs 루트의 README에 google vertex ai 반영
@tae0y
Copy link
Member

tae0y commented Oct 29, 2025

  • 테스트 방법
    dotnet test test/OpenChat.PlaygroundApp.Tests/OpenChat.PlaygroundApp.Tests.csproj --filter "FullyQualifiedName~Ollama"
  • 테스트 리뷰 체크리스트
    • LanguageModelConnector를 상속하는지에 대한 테스트
    • 예외발생 테스트 컨벤션 Tests are NOT testing exceptions #451
    • 하드코딩된 magic string 상수화
    • 경계값 테스트
    • 테스트 시나리오 커버리지
    • Connector 로직 테스트
      • 생성자 : 각 파라미터별 실패, 전체 Valid and 성공
      • EnsureLanguageModelSettingsValid() : 각 파라미터별 실패, 전체 Valid and 성공
      • GetChatClientAsync() : 각 파라미터별 실패, 전체 Valid and 성공
      • LanguageModelConnector.CreateChatClientAsync() : 각 파라미터별 실패, 전체 Valid and 성공

tae0y added 5 commits October 29, 2025 23:21
- 메서드명 컨벤션 반영
- Invalid 케이스 확대: null, 빈문자열, 공백, 탭
- 누락된 Invalid 테스트 케이스 추가
- 테스트 입력값은 InlineData로 처리
- 누락된 예외처리 로직 추가
- EnsureLanguageModelSettingsValid 호출하지 않았을 경우 방어로직
- Connector 멤버로 AppSettings 선언
- 관련 로직 수정
- 불필요한 == 구문 제거
- 호출 메서드별 예외 클래스 수정
@tae0y
Copy link
Member

tae0y commented Oct 29, 2025

  • Azure 배포 테스트중
  • Azure 배포후 컨테이너에서 API_KEY 이슈. API_KEY 길이가 유효하지 않다고 나오는데, 값이 유효하지 않거나 공백으로 전달. 컨테이너 내부에 오류가 발생하니 반복하여 새로운 컨테이너가 생성되는 증상.

완료! secretRef 누락으로 컨테이너에 값 전달 안되던 상황.

image

tae0y added 2 commits October 30, 2025 00:41
- connector 미지정시 google 기본값으로 설정하는 로직 제거
- 컨테이너로 env값 전달하는 로직 추가
- apiKey secretRef
Copy link
Member

@tae0y tae0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Connector, 테스트, 문서, bicep에서 컨벤션을 맞추고
누락된 부분들은 일괄로 추가했습니다.
머지하겠습니다~

@tae0y tae0y merged commit a7ad317 into aliencube:main Oct 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector Implementation & Inheritance: Google Vertex AI

4 participants