Fix Qwen session tool calls and expose thinking compatibility
Publish documentation / publish (push) Successful in 30s

This commit is contained in:
Codex
2026-09-21 16:23:51 +02:00
parent efd7d788d9
commit 84084bba37
10 changed files with 220 additions and 4 deletions
+15 -2
View File
@@ -59,7 +59,7 @@ def test_pi_restructurer_uses_an_ephemeral_no_tools_invocation(tmp_path, monkeyp
]
assert "--no-skills" in argv
assert argv[argv.index("--extension") + 1].endswith(
"/extensions/tht-evidence-json-mode.ts"
"/evidence-extensions/tht-evidence-json-mode.ts"
)
assert "--system-prompt" in argv
assert argv[argv.index("--system-prompt") + 1] == "Evidence-only system prompt"
@@ -120,7 +120,7 @@ def test_evidence_authoring_skill_is_loadable_and_declares_the_wire_schema():
def test_evidence_authoring_json_mode_extension_only_rewrites_the_provider_payload():
extension = (
Path(__file__).parents[1] / ".pi" / "extensions" / "tht-evidence-json-mode.ts"
Path(__file__).parents[1] / ".pi" / "evidence-extensions" / "tht-evidence-json-mode.ts"
).read_text(encoding="utf-8")
assert 'pi.on("before_provider_request"' in extension
@@ -129,6 +129,19 @@ def test_evidence_authoring_json_mode_extension_only_rewrites_the_provider_paylo
assert "registerTool" not in extension
def test_evidence_json_mode_is_not_auto_loaded_into_interactive_sessions():
from tht.evidence.authoring import authoring_skill_path
skill_path = authoring_skill_path()
restructurer = PiEvidenceRestructurer("pi", skill_path)
extension_path = restructurer._json_mode_extension
auto_extensions = skill_path.parents[2] / "extensions"
assert extension_path.is_file()
assert not extension_path.is_relative_to(auto_extensions)
assert not (auto_extensions / extension_path.name).exists()
@pytest.mark.parametrize("response", [_candidate(), [_candidate()]])
def test_pi_restructurer_normalizes_bounded_candidate_envelopes(
tmp_path, monkeypatch, response,