Repository navigation
fix(assistant): resolve the Claude Code model catalog - #999
Open
jiangjiang248 wants to merge 1 commit into
Open
jiangjiang248 wants to merge 1 commit into
jiangjiang248 wants to merge 1 commit into
Conversation
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.
What changed
Selecting Claude Code in AI chat requests
/api/assistant/models?executor=claude-code. The endpoint uses the chat engine ID to look up a catalog keyed byclaude, which returns HTTP 400 and leaves the model picker empty.Share the existing engine-to-catalog mapping with the endpoint and use the resolved key for model family metadata. The regression exercises the Claude Code chat ID alongside the legacy Claude ID, Codex, and an unknown executor.
Fixes #986.
Scope
Compatibility
Both
claude-codeandclaudereturn the built-in Claude model catalog. Unknown executor IDs return HTTP 400.Validation
claude-codeon the base, then pass for the Claude Code and legacy aliases, Codex and an unknown executor with the patch. The isolated test stubs CodeBuddy discovery and Cursor discovery.GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -c ./internal/httpapiandgo vet ./internal/httpapiwith the same target passed.gofmt,git diff --check, public content and Gitleaks checks passed.Safety
AI assistance: Codex prepared the patch and ran the validation above.