Skip to content

Commit e1e53bc

Browse files
authored
fix: build issues (#435)
1 parent 17fded9 commit e1e53bc

7 files changed

Lines changed: 16 additions & 13 deletions

File tree

echo/frontend/src/components/project/HostGuidePDF.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export const HostGuidePDF = ({
272272
<View style={styles.mainContent}>
273273
<View style={styles.stepsContainer}>
274274
{steps.map((step, index) => (
275-
<View key={index} style={styles.stepRow}>
275+
<View key={`step-${step}`} style={styles.stepRow}>
276276
<Text style={styles.stepNumber}>{index + 1}.</Text>
277277
<Text style={styles.stepText}>{step}</Text>
278278
</View>

echo/server/dembrane/api/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from dembrane.api.stateless import StatelessRouter
1212
from dembrane.api.participant import ParticipantRouter
1313
from dembrane.api.conversation import ConversationRouter
14-
from dembrane.api.project_webhook import ProjectWebhookRouter
1514
from dembrane.api.user_settings import UserSettingsRouter
15+
from dembrane.api.project_webhook import ProjectWebhookRouter
1616

1717
logger = getLogger("api")
1818

echo/server/dembrane/api/user_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from logging import getLogger
22

33
import requests
4-
from fastapi import APIRouter, HTTPException, UploadFile
4+
from fastapi import APIRouter, UploadFile, HTTPException
55

66
from dembrane.directus import directus
77
from dembrane.api.dependency_auth import DependencyDirectusSession

echo/server/dembrane/llm_router.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
import json
2020
import logging
21-
from typing import Any, Dict, List, Optional
21+
from typing import Any, Dict, List, Literal, Optional
2222

23-
from litellm import Router
23+
from litellm import Router # type: ignore[attr-defined]
2424
from litellm.utils import get_model_info
2525

2626
from dembrane.settings import LLMProviderConfig, get_settings
@@ -34,7 +34,7 @@
3434
ROUTER_NUM_RETRIES = 3
3535
ROUTER_ALLOWED_FAILS = 3 # Failures per minute before cooldown
3636
ROUTER_COOLDOWN_TIME = 60 # Seconds to cooldown a failed deployment
37-
ROUTER_ROUTING_STRATEGY = "simple-shuffle" # Recommended for production
37+
ROUTER_ROUTING_STRATEGY: Literal["simple-shuffle"] = "simple-shuffle" # Recommended for production
3838

3939
# Global router instance (lazy initialized)
4040
_router: Optional[Router] = None
@@ -261,9 +261,11 @@ def get_min_context_length(model_group: str) -> int:
261261
try:
262262
resolved = config.resolve()
263263
model_info = get_model_info(resolved.model)
264-
if model_info and model_info.get("max_input_tokens"):
265-
max_tokens = model_info["max_input_tokens"]
266-
if min_tokens is None or max_tokens < min_tokens:
264+
max_tokens = model_info.get("max_input_tokens") if model_info else None
265+
if isinstance(max_tokens, int) and max_tokens > 0:
266+
if min_tokens is None:
267+
min_tokens = max_tokens
268+
elif max_tokens < min_tokens:
267269
min_tokens = max_tokens
268270
logger.debug(f" {model_group}[{suffix}] {resolved.model}: {max_tokens} tokens")
269271
except Exception as e:

echo/server/dembrane/llms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from dembrane.settings import get_settings
99

1010
if TYPE_CHECKING:
11-
from litellm import Router
11+
from litellm import Router # type: ignore[attr-defined]
1212

1313
logger = logging.getLogger(__name__)
1414

echo/server/dembrane/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ def get_deployments_for_group(
184184
value = vars_dict[env_field]
185185
# Handle JSON fields
186186
if config_field in ("vertex_credentials", "gcp_sa_json"):
187-
value = _coerce_service_account(value)
188-
config_data[config_field] = value
187+
config_data[config_field] = _coerce_service_account(value)
188+
else:
189+
config_data[config_field] = value
189190

190191
# Only add if model is configured
191192
if config_data.get("model"):

echo/server/dembrane/transcribe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def transcribe_audio_dembrane_26_01_redaction(
368368
logger.info(
369369
f"Transcription failed with AssemblyAI. Continuing with empty transcript: {e}"
370370
)
371-
transcript, response = "[Nothing to transcribe]", {}
371+
transcript = "[Nothing to transcribe]"
372372

373373
# Apply regex PII redaction BEFORE the correction workflow
374374
if not assemblyai_response_failed:

0 commit comments

Comments
 (0)