Skip to content

Conversation

@hiddenpath
Copy link
Owner

@hiddenpath hiddenpath commented Jan 9, 2026

fix validate workflow
add mistral provider and its models to ai-protocol


Note

Introduces first-class Mistral support and tightens config validation.

  • New provider: v1/providers/mistral.yaml with OpenAI-compatible chat endpoint, response_paths, streaming event_map, tool-call normalization, rate limit headers, retry policy, and capability flags
  • New models: v1/models/mistral.yaml registering mistral-*-latest, pixtral-*-latest, open-mistral-7b, open-mixtral-8x7b, and mistral-tiny with capabilities/context windows
  • Validation: scripts/validate-configs.sh now validates YAML against schemas/v1.json via ajv (draft-07) and lints with yamllint
  • Schema tweak: schemas/v1.json header updated (drops $schema line)

Written by Cursor Bugbot for commit fa0dce8. This will update automatically on new commits. Configure here.

- Add mistral provider configuration (v1/providers/mistral.yaml)
  - OpenAI-compatible API format
  - Support for Mistral-specific parameters (parallel_tool_calls, safe_prompt, etc.)
  - SSE streaming support
  - Tool calling support

- Add Mistral model definitions (v1/models/mistral.yaml)
  - 8 models: mistral-small/medium/large-latest, pixtral-small/large-latest,
    open-mistral-7b, open-mixtral-8x7b, mistral-tiny
  - Includes capabilities, context windows, and metadata

Based on official Mistral AI API documentation: https://docs.mistral.ai/api
The schema file uses JSON Schema Draft 2020-12, but ajv-cli needs
explicit specification of the draft version. This fixes the validation
error: 'no schema with key or ref https://json-schema.org/draft/2020-12/schema'
ajv-cli doesn't fully support Draft 2020-12. Change schema to
Draft-07 which is widely supported by ajv-cli and other validators.

Changes:
- schemas/v1.json: Change \ from draft/2020-12 to draft-07
- scripts/validate-configs.sh: Remove --spec=draft2020 (not needed for draft-07)

This fixes the validation error: 'no schema with key or ref
https://json-schema.org/draft/2020-12/schema'
ajv-cli cannot parse the \ field in the schema file itself.
The \ field is only metadata for editor support and doesn't
affect validation functionality. Removing it allows ajv-cli to
properly validate the schema and data files.

This fixes the error: 'no schema with key or ref
https://json-schema.org/draft-07/schema'
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 26

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

type_path: "error.type"
param_path: "error.param"

capabilities: [chat, tools, streaming, parallel_tools, agentic]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistral provider capabilities missing vision for Pixtral models

Medium Severity

The Mistral provider's capabilities list doesn't include vision, but the Pixtral models (pixtral-small-latest and pixtral-large-latest) declare vision in their model capabilities. This is inconsistent with other providers (OpenAI, Anthropic, Gemini, Qwen) that include vision in provider capabilities when they have vision-capable models. If runtimes validate requests against provider capabilities before model capabilities, vision requests to Pixtral models may be incorrectly rejected.

Additional Locations (1)

Fix in Cursor Fix in Web

@hiddenpath hiddenpath closed this Jan 9, 2026
provider: mistral
model_id: "mistral-large-latest"
display_name: "Mistral Large"
context_window: 32000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistral Large context window likely incorrect at 32k

Medium Severity

The context_window for mistral-large-latest is specified as 32000, but Mistral Large 2 and 3 (which the -latest endpoint resolves to) have 128k context windows. This is inconsistent with the Pixtral models in the same file which correctly specify 128000. Applications relying on this configuration would underutilize the model's actual context capacity by 4x, potentially affecting chunking strategies and context management decisions.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants