Skip to content

Conversation

@hyperfinitism
Copy link

This pull request updates the fallback logic for Llama models in modelCapabilities.ts.

Llama 3

The current fallback logic for Llama3 behaves as follows (in order):

  1. if modelName includes llama3 → use llama3
  2. else if modelName includes llama3.1 → use llama3.1
  3. else if modelName includes llama3.2 → use llama3.2
  4. else if modelName includes llama3.3 → use llama3.3

With this order, any modelName that includes llama3.1, llama3.2 or llama3.3 matches clause (1), and is captured by the generic llama3 before it can fall back to the more specific llama3.1, llama3.2, or llama3.3 variants as intended.

This PR fixes the issue by moving clause (1) to the end, so that the specific llama3.1 / llama3.2 / llama3.3 take precedence over the generic llama3 match.

Llama 4

Currently a modelName matching llama4-maverick incorrectly falls back to llama4-scout. This PR also fixes this issue.

Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
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.

1 participant