Make backends extensible without editing core stdlib internals
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading mellea/stdlib/session.py and mellea/stdlib/start_backend.py, then trace backend_name_to_class and _resolve_model_id_str. Decide how registration, typing, and model defaults should work; done means an external backend can be added without changing the core unions, built-in overloads remain precise, and the docs explain authoring and use.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Adding a backend today requires editing core stdlib internals in several places at once:
- the
Literal[...]backend-name unions onstart_session(mellea/stdlib/session.py) andstart_backend(mellea/stdlib/start_backend.py) - the
if/elifdispatch inbackend_name_to_class - the backend→model-attr map in
_resolve_model_id_str - a block of
@overloads per backend instart_backend
That means every new provider (e.g. #1426) is a change to core union types and dispatch, and the ongoing maintenance (e.g. provider model catalogs drifting over time) falls on core maintainers. It doesn't scale, and it sets the bar too high for what is often just a provider-convenience wrapper.
Goal
A registration mechanism so a backend can be added from outside stdlib without editing the core union types or dispatch.
Scope / open questions
- Registration API: how are backend names/aliases registered? A registry dict, a decorator, or Python entry points via
pyproject.toml. Entry points would let providers ship backends in separate packages. - Typing:
start_backendcurrently relies onLiteral+@overloadfor precise return types. Decide the typing contract for dynamically-registered backends (likely a generic fallback overload, with precise overloads kept only for built-ins). - Model-id resolution:
_resolve_model_id_strhardcodes a backend→attr map. A registered backend needs to declare its own model-attr / default-model behavior. - Docs: a short "writing a backend" guide, plus a note in the core docs on how to use said backends.
Acceptance
- A new provider backend can be added with no edits to
session.py/start_backend.pycore unions. - Built-in backends keep their precise typed overloads.
- Docs cover both authoring and using a contributed backend.
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 161
- Merge trung bình
- 4 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 45
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của generative-computing/mellea
-
bug: `mellea.plugins.builtin_debug.generation.log_generation_post_call` shows model as unknownĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
generative-computing/mellea#1864 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug: instruct() and react() replay tool-call turns without tool_callsCó thể đã có người làm @simonyang08 đã nhận 21 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
generative-computing/mellea#1784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Silently mangled docstrings: lone backslash line-continuations in non-raw docstrings collapse command examplesCó thể đã có người làm @madhusudhan1260 đã nhận 18 ngày trước. Đang mởgood first issue p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
generative-computing/mellea#1780 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area/telemetry enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
generative-computing/mellea#1210 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add requirement priorityĐang mởarea/requirement area/stdlib enhancement p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
generative-computing/mellea#31 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của generative-computing/mellea
Issue tương tự
-
bug game: 0100FF500E34A000 game: 0400FF500E34A001 mac packing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jxxghp/MoviePilot#7576 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jbaruch/software-factory#266 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cron: raise a distinct error when next_fire finds no match in its search bound (from #813 item 5)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày