Skip to content

Fix router media capability selection and Anthropic thinking replay#276

Open
Kaguya-19 wants to merge 5 commits into
OpenBMB:mainfrom
Kaguya-19:feat/better_router_0624
Open

Fix router media capability selection and Anthropic thinking replay#276
Kaguya-19 wants to merge 5 commits into
OpenBMB:mainfrom
Kaguya-19:feat/better_router_0624

Conversation

@Kaguya-19

Copy link
Copy Markdown
Collaborator

Summary

  • Prevent router from selecting text-only models for requests containing image, PDF, or audio input.
  • Make model request validation reject unsupported media instead of silently replacing it with placeholders.
  • Preserve Anthropic thinking signatures when replaying assistant thinking blocks.

Changes

  • Added media requirement detection for canonical messages and router fallback filtering based on multimodal.input.
  • Added mediaCapabilityRerouted mutation metadata for router decisions corrected by media capability checks.
  • Removed unsupported media downgrading from model request validation.
  • Preserved Anthropic thinking.signature in request building and non-streaming response parsing.

Verification

  • Ran focused TypeScript checks for modified router/model files.
  • Ran focused local tests for media routing and Anthropic thinking signature handling.
  • Full build was not used as final verification because existing untracked tests in this workspace reference outdated APIs and fail independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant