fix(annotate): replace Literal types with str for older draccus

Older draccus versions (e.g. 0.10.x bundled in some envs) lack a decoder
for typing.Literal and raise:
  No decoding function for type typing.Literal['vllm', 'transformers', 'stub']

Switching VlmConfig.backend from Literal to str works under every
draccus version. The runtime branch in vlm_client.make_vlm_client
already validates the value and raises ValueError on unknown backends,
so the constraint stays enforced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-04-27 18:26:57 +02:00
parent 79ca79cba2
commit d170402075
@@ -18,7 +18,6 @@ from __future__ import annotations
from dataclasses import dataclass, field
from pathlib import Path
from typing import Literal
@dataclass
@@ -61,7 +60,8 @@ class Module3Config:
class VlmConfig:
"""Shared Qwen-VL client configuration."""
backend: Literal["vllm", "transformers", "stub"] = "vllm"
backend: str = "vllm"
"""One of ``vllm``, ``transformers``, or ``stub`` (tests only)."""
model_id: str = "Qwen/Qwen3.6-27B-FP8"
max_new_tokens: int = 512
temperature: float = 0.2