Skip to content

OpenAIFilterer ignores URL config, always hits api.openai.com #43

@joryirving

Description

@joryirving

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

  1. Configure OpenAI filter with custom URL in YAML
  2. Messages are processed but request goes to https://api.openai.com/v1/chat/completions
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions