Repository navigation
pi-ai adapter: deferLoading tools cause a hard UNSUPPORTED_CONTENT error — please degrade instead
#8679
Willatzhang
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Running dsh 0.2.0-rc.2 with the pi-ai provider, any tool marked
deferLoading: truemakes the adapter throw before the request is sent:Meanwhile the core already handles the "unsupported route" case gracefully —
packages/llm/llm/src/content.ts:431-436stripsdeferLoadingand passes the full tool list immediately whentoolUpdate === undefined:So the intent ("unsupported routes get all tools upfront") already exists at the projection layer; the pi-ai adapter's hard throw defeats it at its own layer.
Suggestion: mirror the core's degradation in
toolsOf— drop the throw, stripdeferLoading, send the full list. Alternatively, if the throw is intentional for some Pi-side reason, documenting the provider support matrix fordeferLoadingwould help.All reactions