Skip to content

Commit dacba16

Browse files
igerberclaude
andcommitted
Fix stale Chat Completions API reference in skill doc
The data-transmission note in .claude/commands/ai-review-local.md said the script POSTs to OpenAI's Chat Completions API. The script has used the Responses API (ENDPOINT = .../v1/responses) for some time; this is a leftover from before that migration. Adds a TestSkillDocAPIConsistency regression test that grep-asserts the skill doc never says "Chat Completions API" again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 600a4ac commit dacba16

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

.claude/commands/ai-review-local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ runs `--force-fresh` or when a rebase invalidates the tracked commit.
507507
- **Data transmission**: In non-dry-run mode, this skill transmits the unified diff,
508508
changed-file metadata, full source file contents (in standard/deep mode),
509509
import-context files (in deep mode), selected methodology registry text, and
510-
prior review context (if present) to OpenAI via the Chat Completions API.
510+
prior review context (if present) to OpenAI via the Responses API.
511511
Use `--dry-run` to preview exactly what would be sent.
512512
- This skill pairs naturally with the iterative workflow:
513513
`/ai-review-local` -> address findings -> `/ai-review-local` -> `/submit-pr`

tests/test_openai_review.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,24 @@ def test_gpt55_pro_snapshot_matches_pro(self, review_mod):
16631663
assert snapshot == base
16641664

16651665

1666+
class TestSkillDocAPIConsistency:
1667+
"""Catch doc drift between the script's API endpoint and the skill doc's
1668+
user-facing data-transmission note."""
1669+
1670+
def test_skill_doc_does_not_reference_chat_completions(self):
1671+
"""Skill doc must not say "Chat Completions API" — script uses Responses API."""
1672+
assert _SCRIPT_PATH is not None
1673+
repo_root = _SCRIPT_PATH.parent.parent.parent
1674+
doc_path = repo_root / ".claude" / "commands" / "ai-review-local.md"
1675+
if not doc_path.exists():
1676+
pytest.skip("ai-review-local.md not found")
1677+
text = doc_path.read_text()
1678+
assert "Chat Completions API" not in text, (
1679+
"Skill doc references stale Chat Completions API; "
1680+
"script uses Responses API at openai_review.py:ENDPOINT"
1681+
)
1682+
1683+
16661684
class TestExtractResponseText:
16671685
def test_prefers_output_text_field(self, review_mod):
16681686
result = {"output_text": "Direct text.", "output": []}

0 commit comments

Comments
 (0)