feat(OnlyAgent): add Claude (Anthropic) as AI provider - #204
Merged
Conversation
- Add ClaudeLive service using URLSession SSE streaming against https://api.anthropic.com/v1/messages with x-api-key and anthropic-version headers - Add ClaudeSettingReducer (TCA), ClaudeSettingView, ClaudeTool, ClaudeDataModels and ClaudeSharedKey (Keychain storage) - Register .claude case in ModelProvider enum and wire all switch statements in ModelProviderService, AgentCommand and ModelProviderSettingView - Add claude.imageset to Assets catalog - Add claude models (claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5-20251001) to models.json and extend RemoteModelProviderKey / ProviderModelsResponse accordingly
lou1s19
requested review from
dadameng,
jacklandrin,
leonmtg and
shayanbo
as code owners
June 23, 2026 09:06
jacklandrin
approved these changes
Jun 28, 2026
Contributor
Author
|
Hello :)
I did another pull request, feel free to check it out when you can.
Best regards!
Von: Bo Liu ***@***.***>
Datum: Sonntag, 28. Juni 2026 um 11:50
An: jacklandrin/OnlySwitch ***@***.***>
Cc: Louis ***@***.***>; Author ***@***.***>
Betreff: Re: [jacklandrin/OnlySwitch] feat(OnlyAgent): add Claude (Anthropic) as AI provider (PR #204)
Merged #204<#204> into main.
—
Reply to this email directly, view it on GitHub<#204?email_source=notifications&email_token=BMV7EXEDRZMZLSW2E3YYVED5CDS6PA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTENZSHE3DONJXGYZTNJTSMVQXG33OUZQXK5DIN5ZKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#event-27296757636>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BMV7EXDKQ35J4BWW3N5WBKT5CDS6PAVCNFSNUABFKJSXA33TNF2G64TZHM2DGMZWGE4TSMZYHNEXG43VMU5TINZSGQZDSMZZG44KC5QC>.
You are receiving this because you authored the thread.
|
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.
Summary
Adds Claude (Anthropic) as a fourth AI provider in Only Agent, alongside Ollama, OpenAI, Codex and Gemini.
Changes
New —
ClaudeSettings/module:ClaudeService.swift— SSE streaming viaURLSessionagainstapi.anthropic.com/v1/messagesClaudeSettingReducer.swift— TCA reducer (appear / check / getModels / verify)ClaudeSettingView.swift— API key input + Check button + model listClaudeTool.swift,ClaudeDataModels.swift,ClaudeSharedKey.swift— tool wrapper, model type, Keychain storageclaude.imageset/— tab iconModified:
ModelTool.swift—case claudeinModelProviderModelProviderService.swift—ClaudeLivewired into all switch statementsAgentCommand.swift—.claude: ClaudeTool()branchModelProviderSettingView.swift— Claude tab + content caseUserDefaultsKeys.swift—claudeAPIkey constantProviderModelsResponse.swift—case claude+("anthropic", "claude")mappingmodels.json—claude-opus-4-8,claude-sonnet-4-6,claude-haiku-4-5-20251001API
https://api.anthropic.com/v1/messagesx-api-keyheaderanthropic-version: 2023-06-01content_block_delta/text_deltaURLSessiondirectlyTest plan