fix: add "cannot determine type" to Responses API fallback markers#1763
Open
gdeyoung wants to merge 9 commits into
Open
fix: add "cannot determine type" to Responses API fallback markers#1763gdeyoung wants to merge 9 commits into
gdeyoung wants to merge 9 commits into
Conversation
…tection with risk scoring
… guard, CC protocol, GitHub config
…nce and plugin-first rule
…ocs against framework
Fixed 10 broken tools (voice_stt, voice_tts, image_gen, video_gen, media_pipeline, thinking_council, content_extraction, enrichment_tool, knowledge_manager, kg_dreamer) Root causes found and fixed: - helpers/ namespace collision (7 tools) - Tool filename mismatch (7 tools) - Missing Tool inheritance (3 tools) - Extension filename deduplication (23 extensions renamed) - kg_dreamer: syntax error + missing export + missing factories Enforcement architecture: - 23 uniquely-named tool_execute_before extensions - 13 tools verified blocked from main agent - Subordinates pass through freely Other fixes: - backup_manager SSH credential resolution (3-tier fallback) - Deleted stale plugins/plugins/ mirror - Deleted 7 empty helpers/ dirs - Created 7 prompt files, kg_dreamer factories.py - ulimit raised to 65536 - Platform: 20 registered tools, 64 skills, 50 plugins
When an OpenAI-compatible server (e.g., llama.cpp) receives a Responses API request with complex input items it cannot parse, it returns: 400 - Cannot determine type of item This is a shape-specific Bad Request indicating the provider cannot parse Responses payloads, which should trigger fallback to Chat Completions per the transport DOX contract (litellm_transport.py.dox.md line 30). The marker was missing from _looks_like_responses_request_rejected(), causing the transport to raise BadRequestError instead of falling back. Verification: Tested against llama.cpp server (Qwen3.6-27B) at http://192.168.1.243:11437/v1/responses - returns 400 with complex input items, 200 with simple string input. After patch, transport falls back to /v1/chat/completions successfully.
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.
Problem
When an OpenAI-compatible server (e.g., llama.cpp) receives a Responses API request with complex input items it cannot parse, it returns:
This is a shape-specific Bad Request indicating the provider cannot parse Responses payloads, which should trigger fallback to Chat Completions per the transport DOX contract (
litellm_transport.py.dox.mdline 30):The marker was missing from
_looks_like_responses_request_rejected(), causing the transport to raiseBadRequestErrorinstead of falling back.Fix
Added
"cannot determine type"to the markers list in_looks_like_responses_request_rejected().+ "cannot determine type",Verification
Tested against llama.cpp server (Qwen3.6-27B) at
http://192.168.1.243:11437/v1/responses:/v1/chat/completionssuccessfullyDOX Compliance
No DOX update needed — the contract at
litellm_transport.py.dox.mdalready describes this behavior. The code was simply missing the marker to match the documented contract.