Skip to content

Model Config: relax model validation to warning #901

@vprashrex

Description

@vprashrex

Is your feature request related to a problem?
The validate_blob_model_or_raise function currently blocks valid LLM requests with a 400 error when the model isn't found in model_config or when the completion type doesn’t match. This issue arises when there is a lag in DB seeding behind newly available provider models.

Describe the solution you'd like

  • Replace raise HTTPException with logger.warning for the model-not-found scenario.
  • Skip the wrong-completion-type check altogether.
  • Allow requests to flow through to the provider.

Why is this enhancement needed?

  • New models can be used immediately without requiring a DB row.
  • The provider API remains the source of truth; model_config serves only as metadata.
  • Reduce false-positive failures in production due to stale seed data.

Additional context

  • A missing model parameter still returns a 400 error due to structural reasons.
  • The TTS voice check will remain in place, guarded against None model_row.
Original issue

Describe the current behavior
validate_blob_model_or_raise rejects LLM requests with 400 if the model is not found in model_config or if the completion type doesn't match. This blocks valid runtime calls when DB seeding lags behind newly available provider models.

Describe the enhancement you'd like
Replace raise HTTPException with logger.warning for model-not-found and skip the wrong-completion-type check entirely. Let the request flow through to the provider.

Why is this enhancement needed?

  • Adding a new model no longer requires a DB row before it can be used.
  • Provider API stays the source of truth; model_config is metadata, not a gatekeeper.
  • Fewer false-positive failures in prod when seed data is stale.

Additional context

  • Missing model param still returns 400 (structural — can't make the call without it).
  • TTS voice check stays, guarded against None model_row.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No fields configured for Task.

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions