Commit c25946e
committed
fix(providers): drop loguru, fix FallbackBoundModel failover log placeholders
The `FallbackBoundModel._notify` WARNING used stdlib `%s` positional
substitution but `_log` was loguru when installed, which does not perform
that substitution — so the failover line rendered with literal `%s`
placeholders instead of the resolved provider labels:
cubepi.providers.fallback: failover triggered failed=%s → next=%s
reason=%s attempt=%s/%s
cubepi has never declared loguru as a dependency (see the architecture
notes in `chain_providers` / `_log_tracing_warning`), and hosts that
prefer loguru can intercept stdlib records. Remove the try-import-loguru
branches in `fallback.py` and `base._log_listener_exception`, promote
`logging` to a top-level import in `base.py`, drop the duplicate inline
import in `chain_providers`. The existing `%s`-style log strings now
render correctly through stdlib `logging`.1 parent 2634e0d commit c25946e
3 files changed
Lines changed: 23 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
89 | 100 | | |
90 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
91 | 108 | | |
92 | 109 | | |
93 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
570 | 562 | | |
571 | 563 | | |
572 | 564 | | |
| |||
967 | 959 | | |
968 | 960 | | |
969 | 961 | | |
970 | | - | |
971 | | - | |
972 | 962 | | |
973 | 963 | | |
974 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 33 | + | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| |||
0 commit comments