fix: comment out response model in vllm

This commit is contained in:
Benjamin McCormick 2026-02-11 13:12:41 -05:00
parent efbc2d487d
commit 1fe59aa064
2 changed files with 16 additions and 11 deletions

1
.gitignore vendored
View File

@ -191,3 +191,4 @@ metrics.jsonl
AGENTS.md
lancedb_data/
grafana-data/
traces.jsonl

View File

@ -1936,17 +1936,17 @@ async def honcho_llm_call_inner(
# NOTE: this is all specific to the Representation model.
# Do not call with any other response model.
if provider == "vllm" and response_model:
if response_model is not PromptRepresentation:
raise NotImplementedError(
"vLLM structured output currently supports only PromptRepresentation"
)
openai_params["response_format"] = {
"type": "json_schema",
"json_schema": {
"name": response_model.__name__,
"schema": response_model.model_json_schema(),
},
}
# if response_model is not PromptRepresentation:
# raise NotImplementedError(
# "vLLM structured output currently supports only PromptRepresentation"
# )
# openai_params["response_format"] = {
# "type": "json_schema",
# "json_schema": {
# "name": response_model.__name__,
# "schema": response_model.model_json_schema(),
# },
# }
if stop_seqs:
openai_params["stop"] = stop_seqs
vllm_response: ChatCompletion = cast(
@ -1962,8 +1962,12 @@ async def honcho_llm_call_inner(
if vllm_response.choices[0].message.content is not None:
test_rep = vllm_response.choices[0].message.content
# logger.info(f"test_rep: {test_rep}")
final = validate_and_repair_json(test_rep)
# logger.info(f"final: {final}")
# Schema-aware repair: ensure deductive observations have required fields
repaired_data = json.loads(final)