Skip to content

[OPIK-6465] [SDK] refactor(runner): retire config patterns, add prompt-usage detection in snapshot#6801

Draft
petrotiurin wants to merge 2 commits into
mainfrom
petrot/OPIK-6465-retire-configuration-patterns-add-prompts-snapshot
Draft

[OPIK-6465] [SDK] refactor(runner): retire config patterns, add prompt-usage detection in snapshot#6801
petrotiurin wants to merge 2 commits into
mainfrom
petrot/OPIK-6465-retire-configuration-patterns-add-prompts-snapshot

Conversation

@petrotiurin
Copy link
Copy Markdown
Contributor

Details

Replace the legacy _CONFIGURATION_PATTERNS detection in the runner checklist with a new prompt-library detector. The runner now surfaces instrumentation.prompts (true when the scanned code calls .get_prompt( / .create_prompt( in Python or .getPrompt( / .createPrompt( in TS) instead of the now-unused instrumentation.configuration flag, matching the broader move off opik.Config-with-prompt-fields toward the Prompt library.

  • _CONFIGURATION_PATTERNS and the instrumentation.configuration key removed from the checklist payload.
  • _PROMPT_PATTERNS added; instrumentation.prompts emitted in the same shape as tracing / entrypoint.
  • Snapshot unit tests extended to cover the new flag (positive + negative cases).

Change checklist

  • User facing
  • Documentation update

Issues

  • Resolves #
  • OPIK-6465

AI-WATERMARK

AI-WATERMARK: yes

  • Tools: Claude Code
  • Model(s): Claude Opus 4.7
  • Scope: full implementation
  • Human verification: code review + local test run

Testing

  • cd sdks/python && python -m pytest tests/unit/runner/test_snapshot.py -x -q → 6 passed
  • make precommit-sdks → ruff/ruff-format/mypy all pass on the changed files
  • No TS or Optimizer SDK files changed, so those steps were no-ops.

Documentation

N/A — internal runner snapshot signal; downstream consumer is already provisioned for the new prompts flag.

…t-usage detection in snapshot

Drop _CONFIGURATION_PATTERNS and the legacy `instrumentation.configuration` flag from
the runner checklist, and replace them with _PROMPT_PATTERNS plus a new
`instrumentation.prompts` flag. The prompt-library API (get_prompt/create_prompt and
the TS getPrompt/createPrompt method calls) is now the signal we surface to the
downstream consumer, matching the migration away from opik.Config-based prompt fields.

Implements OPIK-6465: Migrate OllieConfig prompts and instrumentation skill to Prompt
library.
@github-actions github-actions Bot added python Pull requests that update Python code tests Including test files, or tests related like configuration. Python SDK labels May 20, 2026
Comment thread sdks/python/src/opik/runner/snapshot.py
Comment thread sdks/python/src/opik/runner/snapshot.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python SDK python Pull requests that update Python code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant