[Bounty proposal] fix(omi-frankfurter-app): null optional params + single-string targets (US$25 proposed)
Summary
plugins/omi-frankfurter-app rejects valid tool calls that chat runners produce:
get_latest_ratesdocumentsto_currenciesas optional (required: ["base_currency"]in the tool manifest), but a JSONnull— the value runners send for unprovided optional parameters — fails Pydantic validation even though the field has a default. The documented default (all currencies) is unreachable for null.- A bare-string target is rejected.
to_currencies: "eur"fails for both tools although it is unambiguous; runners sometimes collapse single-element lists to a string. - Non-string entries raise
AttributeErrorinside_normalize_currency_codeinstead of a clean validation error.
Fix
PR #14622 (open):
_coerce_currency_list(values, *, allow_null): accepts a single string or a list, dedupes and normalizes codes;nulltakes the default only where the field is optional.LatestRatesRequest.to_currencies:null->[](all currencies), single string -> one-item list.ConvertCurrencyRequest.to_currencies: single string -> one-item list;nullstays rejected (required field) with a clean validation error._normalize_currency_coderejects non-string input withValueError.- All validators moved to
mode="before"; hermetic harness upgraded to execute them, +8 regression tests.
Verification
$ python3 -S test_main.py
Ran 32 tests in 0.016s
OK
Real-pydantic check (production versions):
latest null to_currencies -> [] | base: USD
latest single string -> ['EUR']
convert null targets -> rejected: ValidationError
convert dedupe -> ['EUR', 'GBP']
convert bad entry -> rejected: ValidationError
Bounty
Per the contribution guide ("No bounties available? … suggest your own"), proposing a US$25 bounty for this fix + regression tests. cc @josancamon19 @kodjima33
AI-assisted disclosure: produced by an AI agent running locally on the account holder's machine, reviewed by the account holder, who takes responsibility for it.
Fix is open as PR #14622 — no competing PR exists on this bug.
The two failure modes are clear: to_currencies: null bypassing the default despite not being in required, and bare string inputs like "eur" failing list validation. I'd handle both with a field validator that coerces null to the default and wraps a string in a list before Pydantic processes it. Want to take this on.
Thanks @Nordikdata — this one is already claimed: the fix is open as PR #14622 (validators coerce null to the documented default, wrap bare strings like "eur" in a list, and reject malformed entries cleanly; 8 regression tests + full suite passing, mergeable). To avoid a duplicate PR, best to pick another open bounty. Happy to take review feedback here on #14622.
Closing as already fixed on current main.
Merged #14622; current main plugins/omi-frankfurter-app/_coerce_currency_list handles null + single-string targets