The OpenAIFilterer in filter_openai.go does not have a URL field, so the URL configured in YAML is ignored. It always defaults to api.openai.com.
Compare with annotator_openai.go which correctly has:
- URL string field
- option.WithBaseURL(baseURL) when creating the client
The OpenAIFilterer struct is missing both.
Steps to Reproduce
- Configure OpenAI filter with custom URL in YAML
- Messages are processed but request goes to https://api.openai.com/v1/chat/completions
- Results in 401 Unauthorized (no OpenAI API key)
Expected Behavior
The OpenAIFilterer should respect the URL config field and send requests to the configured endpoint.
Fix
Add URL field to OpenAIFilterer struct and use option.WithBaseURL() when creating the client, similar to how OpenAIAnnotator does it.
The OpenAIFilterer in filter_openai.go does not have a URL field, so the URL configured in YAML is ignored. It always defaults to api.openai.com.
Compare with annotator_openai.go which correctly has:
The OpenAIFilterer struct is missing both.
Steps to Reproduce
Expected Behavior
The OpenAIFilterer should respect the URL config field and send requests to the configured endpoint.
Fix
Add URL field to OpenAIFilterer struct and use option.WithBaseURL() when creating the client, similar to how OpenAIAnnotator does it.