Skip to content

fix: default python session.log level to info#819

Closed
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:test/python-session-log-default-level
Closed

fix: default python session.log level to info#819
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:test/python-session-log-default-level

Conversation

@haosenwang1018
Copy link

Summary

  • make Python CopilotSession.log() send level="info" when callers omit the level argument
  • add a focused client test that locks the default request shape in place

Why

Fixes #810. The public Python API documents level as defaulting to "info", but the current implementation omits level from the RPC entirely when the caller does not pass it. This PR aligns the implementation with the documented/default API contract.

Validation

  • python -m pytest -q python/test_client.py -k 'log_uses_info_level_by_default'
  • git diff --check

@SteveSandersonMS
Copy link
Contributor

Thanks @haosenwang1018 but I'd rather not make this change because:

  1. It makes no difference to the overall behavior - the underlying runtime will apply info as a default anyway, so the behavior is already correct
  2. This change would make the Python SDK diverge from others, also without benefit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is the default for CopilotSession.log(level=...) "info" or Copilot's default?

2 participants