search_flights: currency / pos_country not honored for pricing — results always USD

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start with dist/tools/search-flights.js:76-77 to verify how currency and pos_country are forwarded, then reproduce search_flights with different values and inspect the adapter response and cache behavior. Done means requested currencies are priced correctly, or unsupported currencies are reported explicitly, and changing currency or point of sale does not reuse an incompatible cached response.

Written by the indexing model from the issue text.

Description

Summary

search_flights does not honor the currency (or pos_country) request field for pricing.
Results are always returned with price.currency = "USD" even when another currency is
requested. The top-level currency field echoes the requested value, which makes it look
like it worked, but every results[].price.currency is USD.

This appears to be server-side (adapter) behavior: the plugin correctly forwards the
configured currency.

Environment
Steps to reproduce
  1. Configure default_currency: "CNY" (or pass currency per call).
  2. Call search_flights (e.g. HKG -> MRU, 2026-10-31, adults 1).
  3. Inspect the response.
Observed
  • Request carried currency "CNY" / pos_country "HK" (forwarded correctly per
    dist/tools/search-flights.js:76-77; the response top-level currency echoes it).
  • Every result has price.currency = "USD" (e.g. amount_total 881.15).
  • Booking deeplinks carry ccyc=USD&currency=USD.
  • An uncached request (different date -> fresh cache key) with currency "HKD" /
    pos_country "HK": top-level echoes "HKD", but every results[].price.currency is
    still "USD".
Expected

Either quote prices in the requested currency / point-of-sale, or return an explicit
"currency unsupported" warning/code so clients don't mislabel prices.

Additional bug: response cache key omits currency / pos_country

Repeating the same route/date with a different currency/pos_country returns cached:true
and echoes the FIRST request's currency (requested HKD, got top-level "CNY"). The cache
key should include currency and pos_country; otherwise changing currency appears to
succeed (top-level echo) while serving stale-currency pricing.

Impact

Clients cannot display prices in the user's requested currency; any local currency
conversion risks misquoting the fare. On routes tested, the adapter
effectively quotes USD only.

Dominant language
TypeScript
Stars
4
Forks
2
Avg merge
1h 46m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ExpediaGroup/expedia-openclaw

All issues in ExpediaGroup/expedia-openclaw

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.