@@ -189,6 +189,30 @@ def test_instructions_parameter_defaults_to_append_mode(self) -> None:
189189 "content" : "Direct instructions" ,
190190 }
191191
192+ def test_default_options_includes_model_for_telemetry (self ) -> None :
193+ """Test that default_options merges model from settings for AgentTelemetryLayer span attributes."""
194+ agent : GitHubCopilotAgent [GitHubCopilotOptions ] = GitHubCopilotAgent (
195+ default_options = {"model" : "claude-sonnet-4-5" , "timeout" : 120 }
196+ )
197+ opts = agent .default_options
198+ assert opts ["model" ] == "claude-sonnet-4-5"
199+
200+ def test_default_options_without_model_configured (self ) -> None :
201+ """Test that default_options works correctly when no model is configured."""
202+ agent = GitHubCopilotAgent (instructions = "Helper" )
203+ opts = agent .default_options
204+ assert "model" not in opts
205+ assert opts .get ("system_message" ) == {"mode" : "append" , "content" : "Helper" }
206+
207+ def test_default_options_returns_independent_copy (self ) -> None :
208+ """Test that mutating the returned dict does not affect internal state."""
209+ agent : GitHubCopilotAgent [GitHubCopilotOptions ] = GitHubCopilotAgent (
210+ default_options = {"model" : "gpt-5.1-mini" }
211+ )
212+ opts = agent .default_options
213+ opts ["model" ] = "mutated"
214+ assert agent ._settings .get ("model" ) == "gpt-5.1-mini"
215+
192216
193217class TestGitHubCopilotAgentLifecycle :
194218 """Test cases for agent lifecycle management."""
0 commit comments