Skip to content

bug: injected field in completion message sent to generic openai api may cause pydantic validation errors #548

@Nycrera

Description

@Nycrera

Component

CLI

Summary

After updating from mistral-vibe 2.6.2 to 2.7.0. We get the following error on any request to our local llm api.

status: 400 Bad Request
reason: Bad Request
request_id: N/A
endpoint:  http://mistral-devstral-2-25b.apps.localdomain.local/v1/chat/completions
mode: mistralai/Devstral-Small-2-24B-Instruct-2512
provider_message: 1 validation error for SystemMessage
injected
Extra inputs are not permitted [type="extra_forbidden, input_value=False, input_type=bool]
For further information visit htttps://errors.pydantic.dev/2.12/v/extra_forbidden
body_excerpt:{"error":{"message": 1 validation error for SystemMessage\ninjected\n Extra inputs are not
...
payload_summary: {"model":"mistrai/Devstral-Small-2-24B-Instruct-2512","message_count":2, "approx_chars"26943", "temperature":0.2, "has_tools":true, "tool_chıice:"auto"}

The problem appears to be from the extra addition of the injected field in the user/system messages sent to the completion api which seems to not to support it.

For now, I have managed to solve this by removing the injected field from vibe/core/types.py LLMMessage class or reverting to 2.6.2
This may be a problem on the api side, which forces a specific message model. Just wanted to report if someone else happens to have the same problem.

Reproduction steps

Run vibe to start and send any prompt to a model with:
api_style="openai"
backend="generic"

Versions / environment

mistral-vibe 2.7.0

Logs & screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIRelated to CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions