Skip to content

models.ts has no tests #73

Description

@ANSHSINGH050404

Labels: tests, high-priority

Problem

src/models.ts handles all AI provider resolution — routing model requests to Anthropic, Google, OpenAI, OpenRouter, or Vercel gateway based on configuration. It's the backbone of model selection and affects every AI call in the framework.

Despite being 273 lines of provider logic, it has zero tests.

What needs testing

  • resolveModel() for each provider (Anthropic, Google, Vertex, OpenAI, OpenRouter, OpenCodeZen)
  • Gateway routing (Vercel, OpenRouter, none/cloudflare)
  • Error cases: unknown provider, missing API key, invalid model ID
  • Model alias resolution via getModelId()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions