Skip to content

Commit 3e11f0a

Browse files
committed
fix: Arraylake snippet now uses auto-detected query_type instead of hardcoded 'spatial'
The web UI snippet always showed group='spatial' because query_type was removed from the tool schema but the default fallback was never updated. Now uses _auto_detect_query_type() — same formula as the retrieval pipeline.
1 parent 7619049 commit 3e11f0a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

web/agent_wrapper.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# IMPORT FROM EURUS PACKAGE - SINGLE SOURCE OF TRUTH
2727
from eurus.config import CONFIG, AGENT_SYSTEM_PROMPT
2828
from eurus.retrieval import _arraylake_snippet
29+
from eurus.tools.era5 import _auto_detect_query_type
2930
from eurus.memory import get_memory, SmartConversationMemory # Singleton for datasets, per-session for chat
3031
from eurus.tools import get_all_tools
3132
from eurus.tools.repl import PythonREPLTool
@@ -255,7 +256,14 @@ async def process_message(
255256

256257
arraylake_snippets.append(_arraylake_snippet(
257258
variable=args.get('variable_id', 'sst'),
258-
query_type=args.get('query_type', 'spatial'),
259+
query_type=_auto_detect_query_type(
260+
start_date=args.get('start_date', ''),
261+
end_date=args.get('end_date', ''),
262+
min_lat=args.get('min_latitude', -90),
263+
max_lat=args.get('max_latitude', 90),
264+
min_lon=args.get('min_longitude', 0),
265+
max_lon=args.get('max_longitude', 360),
266+
),
259267
start_date=args.get('start_date', ''),
260268
end_date=args.get('end_date', ''),
261269
min_lat=args.get('min_latitude', -90),

0 commit comments

Comments
 (0)