Skip to content

Conversation

@qoweh
Copy link
Contributor

@qoweh qoweh commented Oct 14, 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

How to Test

  • Get the code
git clone https://github.com/qoweh/open-chat-playground.git
cd open-chat-playground
git checkout feat/261-ConnectorImplementation-Inheritance-AnthropicClaude
  • Test the code
dotnet test test/OpenChat.PlaygroundApp.Tests/OpenChat.PlaygroundApp.Tests.csproj --filter FullyQualifiedName~AnthropicConnectorTests

What to Check

  • Default model and token configuration applied correctly
  • Exception handling for invalid settings
  • Inheritance and type casting behavior validation
  • All related unit tests pass successfully
  • Docs updated and consistent with Anthropic connector section

Other Information about AnthropicConnectorTests.cs

생성/타입 관련

  • Given_Null_Settings_When_Instantiated_Then_It_Should_Throw()
  • Given_Settings_When_Instantiated_Then_It_Should_Return()
  • Given_BaseType_Then_It_Should_Be_AssignableFrom_DerivedType()

EnsureLanguageModelSettingsValid()

  • Given_Settings_Is_Null_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Throw()
  • Given_Invalid_ApiKey_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Throw()
  • Given_Invalid_Model_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Throw()
  • Given_Valid_Settings_When_EnsureLanguageModelSettingsValid_Invoked_Then_It_Should_Return_True()

GetChatClientAsync()

  • Given_Valid_Settings_When_GetChatClientAsync_Invoked_Then_It_Should_Return_ChatClient()
  • Given_Settings_Is_Null_When_GetChatClientAsync_Invoked_Then_It_Should_Throw()
  • Given_Missing_ApiKey_When_GetChatClientAsync_Invoked_Then_It_Should_Throw()

CreateChatClientAsync()

  • Given_Valid_Settings_When_CreateChatClientAsync_Invoked_Then_It_Should_Return_ChatClient()
  • Given_Invalid_Settings_When_CreateChatClientAsync_Invoked_Then_It_Should_Throw()

Adds links to the documentation for the Anthropic connector in the README, covering local machine, local container, and Azure deployments.

Addresses the need to provide clear instructions for utilizing the new Anthropic connector.

Related to aliencube#261
Updates the documentation to refer to Anthropic models instead of the specific Claude model, reflecting the broader range of models now supported.

Relates to aliencube#261
@justinyoo
Copy link
Contributor

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

qoweh added 7 commits October 16, 2025 10:41
Related to : aliencube#342

* Add `MaxTokens` parameter to the Anthropic section in appsettings.json (Microsoft.Extensions.Configuration.Binder automatically converts string values to integers when binding configuration)
Relate to : aliencube#258

* Add`MaxTokens` property to AnthropicSettings
* update LanguageModelConnector to include Anthropic in unsupported list
* will be re-enabled when Anthropic PR is merged
* mark all AnthropicConnectorTests as skipped to avoid CI failures while connector is unsupported
qoweh added 4 commits October 19, 2025 02:02
Related to : aliencube#259

* Add option ‘MaxTokens’ to AnthropicArgumentOptions and update parsing logic

* Update ArgumentOptions.cs, AnthropicArgumentOptions.cs, AnthropicArgumentOptionsTests.cs
@qoweh
Copy link
Contributor Author

qoweh commented Oct 20, 2025

@sikutisa 죄송합니다.. 각 이슈별로 처리하다가 현재는 3까지 진행한 상태입니다!

  1. appsettings.json Modelling: Anthropic Claude #342 -> 해당 commit
  2. Model Class Implementation: Anthropic Claude #258 -> 해당 commit
  3. Command-Line Argument Parsing: Anthropic Claude #259 -> 해당 commit
  4. Command-Line Argument Options Modelling: Anthropic Claude #341
  5. Environment Variables Testing: Anthropic Claude #260

그리고 현재 브랜치 병합하면서 문제생긴 부분이 있는데 해결하고 댓글 남겨놓겠습니다!
-> ArgumentOptionConstants.cs에 추가 안 한 부분있어서 추가했습니다!

Copy link
Contributor

@sikutisa sikutisa left a comment

Choose a reason for hiding this comment

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

일단은 코드부터 보겠습니다. Connector는 작업이 다 안 된 것 같은데 맞나요?

qoweh and others added 9 commits October 27, 2025 22:03
Validates the `MaxTokens` configuration setting in the
`AnthropicConnector` to ensure it is present and a positive integer.
This prevents runtime errors due to missing or invalid configurations.

Also updates the Anthropic connector to use the `MaxTokens` setting from
the configuration for `MaxOutputTokens` option.
Removes an unnecessary comment that restates the purpose of the 'MaxTokens' property.
Adds validation to ensure that the Anthropic connector settings
for max tokens are correctly configured.
Specifically, it checks for both the presence and validity of
the `MaxTokens` setting, throwing an exception if it is missing or invalid.
Updates Anthropic argument options tests to use an integer type for max tokens configuration and environment variables.

This change improves type safety and simplifies the configuration logic by removing the need for string parsing.
* feat: add AnthropicConnector

Related to: aliencube#261

* add bicep

* add bicep
Copy link
Contributor

@sikutisa sikutisa left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@sikutisa sikutisa merged commit ea7c84c into aliencube:main Oct 29, 2025
1 of 2 checks passed
@qoweh
Copy link
Contributor Author

qoweh commented Oct 29, 2025

수고하셨습니다!

바쁘실텐데 죄송합니다 고생하셨습니다!!

@qoweh qoweh deleted the feat/261-ConnectorImplementation-Inheritance-AnthropicClaude branch October 30, 2025 04:34
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: Anthropic Claude

3 participants