Skip to content

Commit ec8d48e

Browse files
committed
solves review comments
1 parent cdddb2b commit ec8d48e

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

radioshaq/radioshaq/orchestrator/factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _llm_model_string_from_llm_config(llm: LLMConfig) -> str:
7676
model = "gemini-2.5-flash"
7777
else:
7878
model = raw_model
79-
if "gemini/" in model:
79+
if model.startswith("gemini/"):
8080
return model
8181
return f"gemini/{model}"
8282
if "/" not in model and not model.startswith(("openai/", "anthropic/", "mistral/", "custom/", "ollama/")):

radioshaq/tests/unit/test_llm_factory.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def test_llm_model_string_gemini_already_prefixed():
9191
assert _llm_model_string_from_llm_config(llm) == "gemini/gemini-2.5-pro"
9292

9393

94+
def test_llm_model_string_gemini_prefix_match_only():
95+
"""Only a leading gemini/ prefix should bypass normalization."""
96+
llm = LLMConfig(provider=LLMProvider.GEMINI, model="pro-gemini/flash")
97+
assert _llm_model_string_from_llm_config(llm) == "gemini/pro-gemini/flash"
98+
99+
94100
def test_llm_api_key_from_llm_config_gemini():
95101
"""When provider is gemini, return gemini_api_key."""
96102
llm = LLMConfig(provider=LLMProvider.GEMINI, gemini_api_key="key123")

radioshaq/web-interface/src/components/maps/OperatorMap.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ export interface OperatorMapProps {
2626

2727
const DEFAULT_HEIGHT = 480;
2828

29+
function getGoogleMarkerIcon(
30+
google: typeof globalThis.google,
31+
marker: OperatorMapMarker
32+
): string | google.maps.Symbol | undefined {
33+
if (marker.iconUrl) {
34+
return marker.iconUrl;
35+
}
36+
if (!marker.color) {
37+
return undefined;
38+
}
39+
return {
40+
path: google.maps.SymbolPath.CIRCLE,
41+
scale: 8,
42+
fillColor: marker.color,
43+
fillOpacity: 0.9,
44+
strokeColor: '#fff',
45+
strokeWeight: 1.5,
46+
};
47+
}
48+
2949
/**
3050
* Unified map: branches on getMapProvider(). Renders Google or Leaflet (OSM) implementation.
3151
*/
@@ -131,7 +151,7 @@ function OperatorMapGoogle({
131151
map: mapRef.current!,
132152
title: m.label ?? m.id,
133153
label: m.label ? { text: m.label, color: '#000' } : undefined,
134-
icon: m.iconUrl ?? undefined,
154+
icon: getGoogleMarkerIcon(google, m),
135155
});
136156
if (m.infoHtml) {
137157
marker.addListener('click', () => {

0 commit comments

Comments
 (0)