Skip to content
Open
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
5 changes: 3 additions & 2 deletions lib/active_agent/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ def self.generate_with(provider_reference, **agent_options)
global_options = provider_config_load(provider_reference)
inherited_options = (self.prompt_options || {}).except(:instructions) # Don't inherit instructions from parent

# Different Service, different APIs
# Different Service, different APIs — discard all inherited options
# to prevent parent provider config (host, api_key, etc.) leaking through
if global_options[:service] != inherited_options[:service]
inherited_options.extract!(:service, :api_version)
inherited_options = {}
end

self.prompt_options = global_options.merge(inherited_options).merge(agent_options)
Expand Down