| 196 | if keywords: |
| 197 | blocks.append("Keywords: " + ", ".join(str(keyword).strip() for keyword in keywords if str(keyword).strip())) |
| 198 | |
| 199 | return "\n\n".join(block for block in blocks if block).strip() |
| 200 | |
| 201 | |
| 202 | def _requires_trust_remote_code(model_name: str) -> bool: |
| 203 | normalized = str(model_name or "").strip().lower() |
| 204 | return normalized.startswith("qwen/") |
| 205 | |
| 206 | |
| 207 | def _resolve_local_model_path() -> Optional[Path]: |
| 208 | configured = os.environ.get("LOCAL_EMBEDDING_MODEL_PATH", "").strip() |
| 209 | if not configured: |