Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions site-src/guides/serve-multiple-genai-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@ First install this server. Depending on your Gateway provider, you can use one o
oci://registry.k8s.io/gateway-api-inference-extension/charts/body-based-routing
```

=== "Kgateway"

Kgateway does not require the Body-Based Routing Extension, and instead natively implements Body-Based Routing.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@howardjohn thanks for the PR.
we’re currently in the process of extending BBR to more than just extracting the model from the body to a header.
more details in #1812.

is it possible to add to kgateway support to invoke additional ext proc (before epp) as it is with the other gateways?

current PR is very tailored to the current BBR but that will get outdated very quickly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nirrozenbaum kgateway can do ext_proc but we believe its best to do processing natively. We can do what is described in #1812 natively as well and am happy to update the docs with examples once it lands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we believe its best to do processing natively

I agree with you here 100%. there is a different (not directly related) effort to standardize exactly this as part of k8s AI-Gateway WG, and ideally after we standardize it we should replace the existing ext proc based bbr with native one. but that’s a different story.

+1 on proceeding and take the “fix it forward” approach.

/lgtm
/approve

Thanks! 🙏🏼

To use Body Based Routing, apply an `AgentgatewayPolicy`:

```yaml
apiVersion: gateway.kgateway.dev/v1alpha1
kind: AgentgatewayPolicy
metadata:
name: bbr
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: inference-gateway
traffic:
phase: PreRouting
transformation:
request:
set:
- name: X-Gateway-Model-Name
value: 'json(request.body).model'
```

=== "Other"

```bash
Expand Down