ReMe/reme/components
BeiMu-new c9448aeb19 fix(embedding): keep provider-wide failures out of the per-item split
Review follow-up on the P2 raised against 4d8a3c5.

`_call_with_retry` sent every unrecognized exception to `_embed_individually`
whenever the request had more than one item. Only rate limiting and
`insufficient_quota` were excluded, so a 401, a 403 or a 5xx still split a
ten-item request into ten extra single-item requests, none of which can
succeed: credentials, permissions and server outages are properties of the
endpoint, not of any individual input.

The split path is now gated on a dedicated classifier,
`_is_provider_wide_failure()`, which recognizes 401/403 and 5xx by status
code (with the OpenAI SDK class names as a fallback for exceptions that do
not expose one). Transient server errors keep their retry policy through the
existing backoff; the remaining provider-wide failures stop the loop and
report unhealthy, like the quota branch. Input-dependent rejections such as
the per-item context-length limit are unchanged and still isolate one item
at a time.

Regression coverage: test_provider_wide_credentials_errors_are_not_split_into_per_item_requests
(401/403 -> a single request of size 10) and
test_provider_wide_server_errors_are_retried_without_splitting
(500 -> batch sizes [10, 10, 10] with sleeps [1.0, 2.0]). The existing
context-length, quota, 429 and per-item transient-retry tests are retained.

Local verification, using the repo's own hook arguments:
  pylint  -> Your code has been rated at 10.00/10, exit 0
  black   -> 2 files would be left unchanged
  flake8  -> clean
Classifier discriminator check (old vs new split decision, extracted from the
production file and executed):
  400 context-length     -> SPLIT / SPLIT
  401, 403, 500, 504     -> SPLIT / NO-SPLIT
  429 and insufficient_quota keep their own earlier branches.
2026-10-09 12:21:52 +08:00
..
agent_wrapper feat: refine local-first research and memory workflows (#444) 2026-08-11 23:32:34 +08:00
as_embedding fix(embedding): exclude provider init from health timeout (#484) 2026-08-21 11:23:14 +08:00
as_llm init: reme version 0.4.0 (#284) 2026-06-22 15:41:19 +08:00
client feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
embedding_store fix(embedding): keep provider-wide failures out of the per-item split 2026-10-09 12:21:52 +08:00
file_catalog feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
file_chunker fix(index): tolerate invalid text encoding (#490) 2026-08-26 16:16:26 +08:00
file_graph feat(auto_resource): interpret image resources into daily notes (#500) 2026-09-07 12:00:38 +08:00
file_store fix(embedding): keep one bad item from dropping its whole batch 2026-09-30 17:06:31 +08:00
job fix(job): preserve nested exception details (#544) 2026-09-14 16:54:54 +08:00
keyword_index feat(tags): add configurable tag indexing and filtered hybrid search (#530) 2026-09-10 18:01:09 +08:00
outbound_proxy feat: add Auto Fin cookbook and managed outbound proxy support (#392) 2026-07-25 18:09:39 +08:00
service feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
tag_index feat: auto-tag plugin-generated reports (#534) 2026-09-11 11:52:52 +08:00
tokenizer Refactor logging levels and add dream schema definitions (#291) 2026-06-24 16:44:03 +08:00
__init__.py feat(Tag filter): Add an optional rebuildable tag index for file frontmatter (#517) 2026-09-07 15:52:17 +08:00
application_context.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
base_component.py feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
component_registry.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
prompt_handler.py fix(prompt): default omitted conditional flags to false (#424) 2026-08-06 16:22:59 +08:00
runtime_context.py feat: add workspace web APIs and star growth report (#416) 2026-08-05 18:03:37 +08:00