bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknown

未关闭 适合新手
#1,864 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ollama, python

调研方向

从 issue 中提到的后置调用日志记录器 mellea.plugins.builtin_debug.generation.log_generation_post_call 开始,将它接收到的数据与 log_generation_pre_call 以及 docs/docs/how-to/debug-with-plugins.md 中的设置进行比较。使用提供的代码片段,在设置 MELLEA_LOGS_LEVEL=DEBUG 的情况下,针对 Ollama 的 granite4.2:3b 复现问题。完成的标准是:对于某个给定的 gen_id,后置调用日志行打印的模型名称与前置调用日志行相同,同时现有的延迟和 token 输出保持不变。

由索引模型根据 Issue 内容生成。

描述

bug
What happened?

Executing an example based on docs/docs/how-to/debug-with-plugins.md has the post-call emitting model=unknown while the pre-call correctly identified the model.

== 13:35:46-DEBUG ======
[📤 GEN-PRE-CALL gen_id=bb276b72-c8bc-433f-9543-ce393dd92a8d] model=granite4.2:3b | prompt=Write an email inviting interns to an office party at 3:30pm.
=== 13:36:03-DEBUG ======
[📥 GEN-POST-CALL gen_id=bb276b72-c8bc-433f-9543-ce393dd92a8d] model=unknown | latency=17348ms | tokens=(31+478=509) | response=Subject: Invitation: Office Party – 3:30 pm Today  Dear Interns,  We’re excited to invite you to ...
What did you expect to happen?

Both the pre-call and post-call should correctly emit the model.

How can we reproduce it?
# after:
# export MELLEA_LOGS_LEVEL=DEBUG
# execute:
# python 1.py
$ cat 1.py
from mellea.plugins.builtin_debug.generation import (
    log_generation_pre_call,
    log_generation_post_call,
)
from mellea.plugins import register

register([
    log_generation_pre_call,
    log_generation_post_call,
])

import mellea

with mellea.start_session() as m:
    email = m.instruct("Write an email inviting interns to an office party at 3:30pm.")
    print(str(email))
Mellea version
(coding in `main`)
python -c "import mellea; print(mellea.__version__)"
0.8.0
Any environmental details we need to know?

Ubuntu 26.04.1 LTS
Python 3.14.4
Ollama
granite4.2:3b

Anything else we need to know?

Arose from discussion of #1862

Relevant log output

主要语言
Python
星标
1.8k
派生
161
平均合并
4 天 3 小时
30 天内合并 PR
45

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

generative-computing/mellea 的其他 Issue

查看 generative-computing/mellea 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。