Skip to content

Default configuration not being enforced #39

@vicocamacho

Description

@vicocamacho

Hi,

While implementing Raix in a project, I discovered that if I globally configure it to use a different model this configuration is not being enforced.

Here is a minimal script to reproduce the behavior:

require "raix"

Raix.configure do |config|
  config.openrouter_client = OpenRouter::Client.new(access_token: ENV.fetch("OR_ACCESS_TOKEN", nil))
  config.model = "meta-llama/llama-3.3-70b-instruct:free"
end

class Foo
  include Raix::ChatCompletion
end

foo = Foo.new

p foo.configuration.model

The output of this script is: meta-llama/llama-3.3-8b-instruct:free instead of meta-llama/llama-3.3-70b-instruct:free

Is there something I’m missing in how the gem should be configured?

Thanks for your work on this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions