wso2 / wso2/api-platform

[Feature]: Policy to support model-based routing to multiple OpenAI-compatible backends

Open
#2,773 7 comments 0 reactions 1 assignee View on GitHub

@Arshardh is already working on this.

Since Aug 6, 2026.

Area/Policies Aspect/Other
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/Other (Anything else which does not match above categories)

Suggested Feature

Need to bring in a default policy in Policy Hub to provide the capability in AI Gateway to support routing requests to different backends based solely on the model field in the request body.

This should allow a single OpenAI-compatible gateway endpoint to

  • Route requests to the appropriate backend based on the model specified in the request body.
  • Allow standard OpenAI-compatible SDKs and IDEs to work by configuring only a single gateway base URL, while the gateway transparently determines the appropriate backend.
  • Eliminate the need to maintain custom policies or custom gateway images.
Related Issues

No response

Steps to Verify
  • Design Document — A detailed design document has been created and reviewed, covering architecture, data flow, and edge cases.
  • Design Mail — A design summary email has been sent to relevant stakeholders for awareness and feedback.
  • Code Review — All code changes have been peer-reviewed and approved according to the project's review standards.
  • Testing Complete — Adequate unit, integration, and/or end-to-end tests have been written and are passing.
  • Documentation Review — User-facing and/or developer documentation has been updated to reflect the new feature and reviewed.
  • Feature Complete — The feature is fully implemented, all checklist items above are done, and it is ready for release.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.