Skip to content

Commit 0d36204

Browse files
jobordujoborduclaude
authored
fix(link-daintree): correct family-gate fallback in fan-out import (#153)
When inferring a family from preset env (e.g. ANTHROPIC_* → "anthropic"), the findVanilla() pool construction erroneously returned [] instead of all candidates when no vanilla slot matched the inferred family. Fix: change pool construction from: familyMatch.length ? familyMatch : (family ? [] : candidates) to: familyMatch.length ? familyMatch : candidates The family gate is still respected when matches exist; when it doesn't, we correctly fall back to all candidates sorted by daintree_preset_id then numeric suffix. Co-authored-by: jobordu <jonathan@jonathanborduas.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 35d1118 commit 0d36204

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
88

9+
## [0.43.1] - 2026-05-03
10+
11+
### Fixed
12+
- fix(link-daintree): fan-out fallback logic no longer silently drops presets when no vanilla provider has a matching `provider` field — the family gate is now correctly bypassed when the inferred family doesn't match any vanilla slot, falling back to all candidates sorted by daintree_preset_id then numeric suffix
13+
914
## [0.43.0] - 2026-05-02
1015

1116
### Changed

commands/nf/link-daintree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function inferFamily(envObj) {
482482
function findVanilla(agentName, family) {
483483
const candidates = providersData.providers.filter(p => p.mainTool === agentName);
484484
const familyMatch = family ? candidates.filter(p => p.provider === family) : candidates;
485-
const pool = familyMatch.length ? familyMatch : (family ? [] : candidates);
485+
const pool = familyMatch.length ? familyMatch : candidates;
486486
// Prefer provider without daintree_preset_id, then lowest numeric suffix
487487
pool.sort((a, b) => {
488488
const aIsClone = !!a.daintree_preset_id;

0 commit comments

Comments
 (0)