Skip to content

Add model validation to get_model_arn() function #15

Description

@lroolle

Problem

The get_model_arn() function in claudeb.sh lacks validation for unknown model names, which can lead to:

  • Inconsistent return formats
  • Silent failures when encountering unknown models
  • Potential AWS Bedrock API failures
  • Poor user experience with unclear error messages

Current Behavior

  • Function accepts any model name without validation
  • Unknown models may cause runtime errors in AWS Bedrock calls
  • No guidance provided for supported model aliases

Proposed Solution

Add model validation logic with two approaches:

Option 1: Strict Validation

  • Add case statement to check against known model aliases
  • Exit with error for unknown models
  • Display list of supported models

Option 2: Flexible Validation

  • Allow custom ARNs to pass through unchanged
  • Warn users about unknown model aliases
  • Provide helpful error messages with suggestions

Implementation

  • Add validation function for model names
  • Update get_model_arn() with validation logic
  • Add error handling with clear messages
  • Update documentation with supported model list
  • Add tests for validation scenarios

Priority

Medium - improves user experience and prevents runtime errors

Labels

  • enhancement
  • bug
  • good first issue

Referenced from: #12 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions