When using vllm or lmdeploy as the inference backend via the OpenAI-compatible API, langextract fails with a ResolverParsingError: Failed to parse JSON content: Expecting value: line 1 column 1 (char 0).
Interestingly, the exact same code and prompt work perfectly when using Ollama. It seems the JSON output from vLLM/lmdeploy is not being correctly captured or parsed by the Resolver, even when the model returns a valid JSON string (verified via manual requests calls).
File ~/programs/miniconda3/envs/agents/lib/python3.12/site-packages/langextract/resolver.py:271, in Resolver.resolve(self, input_text, suppress_parse_errors, **kwargs)
267 logging.exception(
268 "Failed to parse input_text: %s, error: %s", input_text, e
269 )
270 return []
--> 271 raise ResolverParsingError(str(e)) from e
ResolverParsingError: Failed to parse JSON content: Expecting value: line 1 column 1 (char 0)
Environment
Model: Qwen3-32B-GPTQ-Int4
Backend: vLLM / lmdeploy (OpenAI-compatible server)
Current Config:
config = lx.factory.ModelConfig(
model_id="vllm:http://localhost:8000/v1",
provider="VLLMLanguageModel",
provider_kwargs=dict(
temperature=0.7,
max_tokens=1024,
# Server connection settings
timeout=60.0,
),
)
When using
vllmorlmdeployas the inference backend via the OpenAI-compatible API,langextractfails with aResolverParsingError: Failed to parse JSON content: Expecting value: line 1 column 1 (char 0).Interestingly, the exact same code and prompt work perfectly when using
Ollama. It seems the JSON output from vLLM/lmdeploy is not being correctly captured or parsed by theResolver, even when the model returns a valid JSON string (verified via manualrequestscalls).Environment
Model: Qwen3-32B-GPTQ-Int4
Backend: vLLM / lmdeploy (OpenAI-compatible server)
Current Config: