|
29 | 29 | ) |
30 | 30 | from .lifecycle import RunHooks |
31 | 31 | from .logger import logger |
32 | | -from .memory import Session, is_server_managed_conversation_session |
| 32 | +from .memory import Session |
33 | 33 | from .result import RunResult, RunResultStreaming |
34 | 34 | from .run_config import ( |
35 | 35 | DEFAULT_MAX_TURNS, |
@@ -413,7 +413,6 @@ async def run( |
413 | 413 | auto_previous_response_id = kwargs.get("auto_previous_response_id", False) |
414 | 414 | conversation_id = kwargs.get("conversation_id") |
415 | 415 | session = kwargs.get("session") |
416 | | - run_config_was_supplied = run_config is not None |
417 | 416 |
|
418 | 417 | if run_config is None: |
419 | 418 | run_config = RunConfig() |
@@ -504,19 +503,15 @@ async def run( |
504 | 503 | or previous_response_id is not None |
505 | 504 | or auto_previous_response_id |
506 | 505 | ) |
507 | | - history_is_server_managed = ( |
508 | | - server_manages_conversation or is_server_managed_conversation_session(session) |
509 | | - ) |
510 | 506 | validate_override_history_persistence_support( |
511 | 507 | input=input, |
512 | 508 | session=session, |
513 | | - history_is_server_managed=history_is_server_managed, |
| 509 | + response_history_is_server_managed=server_manages_conversation, |
514 | 510 | ) |
515 | 511 |
|
516 | 512 | resolved_trace_include_sensitive_data = resolve_trace_include_sensitive_data( |
517 | 513 | run_state=run_state, |
518 | 514 | run_config=run_config, |
519 | | - run_config_was_supplied=run_config_was_supplied, |
520 | 515 | ) |
521 | 516 | if resolved_trace_include_sensitive_data != run_config.trace_include_sensitive_data: |
522 | 517 | run_config = dataclasses.replace( |
@@ -1469,7 +1464,6 @@ def run_streamed( |
1469 | 1464 | auto_previous_response_id = kwargs.get("auto_previous_response_id", False) |
1470 | 1465 | conversation_id = kwargs.get("conversation_id") |
1471 | 1466 | session = kwargs.get("session") |
1472 | | - run_config_was_supplied = run_config is not None |
1473 | 1467 |
|
1474 | 1468 | if run_config is None: |
1475 | 1469 | run_config = RunConfig() |
@@ -1553,18 +1547,14 @@ def run_streamed( |
1553 | 1547 | or previous_response_id is not None |
1554 | 1548 | or auto_previous_response_id |
1555 | 1549 | ) |
1556 | | - history_is_server_managed = ( |
1557 | | - server_manages_conversation or is_server_managed_conversation_session(session) |
1558 | | - ) |
1559 | 1550 | validate_override_history_persistence_support( |
1560 | 1551 | input=input, |
1561 | 1552 | session=session, |
1562 | | - history_is_server_managed=history_is_server_managed, |
| 1553 | + response_history_is_server_managed=server_manages_conversation, |
1563 | 1554 | ) |
1564 | 1555 | resolved_trace_include_sensitive_data = resolve_trace_include_sensitive_data( |
1565 | 1556 | run_state=run_state, |
1566 | 1557 | run_config=run_config, |
1567 | | - run_config_was_supplied=run_config_was_supplied, |
1568 | 1558 | ) |
1569 | 1559 | if resolved_trace_include_sensitive_data != run_config.trace_include_sensitive_data: |
1570 | 1560 | run_config = dataclasses.replace( |
|
0 commit comments