Skip to content
Merged
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
Comment on lines +109 to 113
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes provider option inheritance behavior in a subtle way (clearing all inherited options when the service changes), but there’s no automated test coverage validating the new behavior. Please add tests that cover: (1) parent/child with different service does not inherit provider-specific keys like host/api_key/model, and (2) same-service inheritance still works, and (3) explicit generate_with overrides still win over YAML config/inheritance.

Copilot uses AI. Check for mistakes.

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