shouldInterceptModelList checks if this is a model list request that should be intercepted
(path string, method string)
| 14 | |
| 15 | // shouldInterceptModelList checks if this is a model list request that should be intercepted |
| 16 | func shouldInterceptModelList(path string, method string) bool { |
| 17 | if method != "GET" { |
| 18 | return false |
| 19 | } |
| 20 | |
| 21 | // Check various model list endpoints |
| 22 | return strings.HasSuffix(path, "/v1/models") || |
| 23 | strings.HasSuffix(path, "/v1beta/models") || |
| 24 | strings.Contains(path, "/v1beta/openai/v1/models") |
| 25 | } |
| 26 | |
| 27 | // handleModelListResponse processes the model list response and applies filtering based on redirect rules |
| 28 | func (ps *ProxyServer) handleModelListResponse(c *gin.Context, resp *http.Response, group *models.Group, channelHandler channel.ChannelProxy) { |
no outgoing calls
no test coverage detected