Add request/response logging hook to native model client
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- ai, api, backend-api-design
調査の方向性
packages/data-designer-engine/src/data_designer/engine/models/clients/ から始めて、ThrottledModelClient、clients/retry.py、clients/types.py を読みます。hook の設計を選ぶ前に、既存の wrapper と transport の構成パターンを比較してください。consumer が prompt、model、kwargs、response body、token usage を含む、同等の request と response の詳細を観測でき、選択したインターフェースの coverage がある状態で issue は完了です。
索引モデルが issue の本文から書いたものです。
説明
Priority Level
Medium (Nice to have)
Is your feature request related to a problem? Please describe.
With the migration from litellm to the native model client in DD 0.5.5, there's no built-in way to capture full HTTP request/response payloads for LLM API calls. Previously, litellm's callback system allowed registering custom loggers that could observe every request and response. This was useful for debugging prompt issues, auditing API calls, and troubleshooting generation failures at scale.
Describe the solution you'd like
Expose a hook or callback mechanism on the native model client that allows consumers to observe request/response data. This could be:
-
httpx event_hooks: The native client uses httpx internally. httpx supports
event_hooks={"request": [...], "response": [...]}on the client constructor. Exposing a way to inject these hooks (e.g. viaModelConfigor theModelClientfactory) would let downstream tools register logging callbacks without modifying DD internals. -
A dedicated logging transport: An optional httpx transport wrapper that logs request/response bodies before forwarding, similar to how
ThrottledModelClientwraps with throttling. -
RunConfig option: A
debug_log_requests: boolfield onRunConfigthat enables built-in request/response logging to a configurable path, handled entirely within DD.
Option 1 is the most flexible (consumers control what's logged). Option 3 is the most user-friendly.
Describe alternatives you've considered
- Keeping litellm as an optional dependency just for debug logging - adds unnecessary dependency weight
- Monkey-patching the httpx client after DD creates it - fragile and version-dependent
- Using Python logging at DEBUG level to capture httpx traffic - httpx logs at TRACE level which is very verbose and not structured
Agent Investigation
Explored DD 0.5.5 codebase:
- Native client lives in
packages/data-designer-engine/src/data_designer/engine/models/clients/ ThrottledModelClientwrapsModelClientwith per-request hooks (throttle acquire/release) - same pattern could wrap with loggingclients/retry.pybuilds httpxRetryTransport- the transport layer is already composable- No existing event_hooks, logging hooks, or callback mechanism on the client
clients/types.pydefinesChatCompletionRequest/Responsewhich contain the structured data that would need to be logged
Additional context
The previous litellm-based logger captured: timestamp, model name, full prompt messages, request kwargs, complete response body, and token usage per API call. Whatever replaces it should capture equivalent data. This is particularly useful when running large-scale generation jobs where individual request failures need to be diagnosed.
Checklist
- I've reviewed existing issues and the documentation
- This is a design proposal, not a "please build this" request
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 227
- 平均マージ
- 22時間 13分
- マージ済み PR(30日)
- 63
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA-NeMo/DataDesigner のほかの issue
-
docs: required_columns description is incomplete for LLM and multimodal columns対応中かも @rksharma-owg が 4 日前に担当しました。 オープンbug triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NVIDIA-NeMo/DataDesigner#1002 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
enforce \from future import annotations` via ruff FA102 rule`対応中かも @chethanuk が 39 日前に担当しました。 オープンtask
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA-NeMo/DataDesigner#760 ·
メンテナーはふだん 1 日以内に返信
-
task
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NVIDIA-NeMo/DataDesigner#1056 ·
メンテナーはふだん 1 日以内に返信
-
dependencies task
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NVIDIA-NeMo/DataDesigner#1054 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
NVIDIA-NeMo/DataDesigner#1048 ·
メンテナーはふだん 1 日以内に返信
NVIDIA-NeMo/DataDesigner の issue をすべて見る
似ている issue
-
idxmax/idxmin raise ValueError when a single partition is all-NA対応中かも @Jason10191019999 が今日担当しました。 オープンneeds triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
[BUG]: Windows GUI package of v1.17.0-rc3 has no GTK DLLs対応中かも @andrut-ds が今日担当しました。 オープンbug CI/CD Pactus-GUI Windows
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
pactus-project/pactus#2428 ·
メンテナーはふだん 1 日以内に返信
-
DiskDataset.reshard() can hang with a zero or negative shard size対応中かも @Programmer-Develops が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 19 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
GNS3/gns3-server#3017 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信