Skip to content

fix: avoid default API base for Bedrock CLI - #41

Open
GioiaZheng wants to merge 1 commit into
amazon-science:mainfrom
GioiaZheng:fix/bedrock-cli-api-base
Open

GioiaZheng wants to merge 1 commit into
amazon-science:mainfrom
GioiaZheng:fix/bedrock-cli-api-base

Conversation

@GioiaZheng

Copy link
Copy Markdown

Why

Bedrock CLI defaults currently pass the extractor model name as extractor_api_base. For Bedrock via LiteLLM, this can make the AWS request builder receive an invalid host and fail with a low-level botocore error. The checker CLI option also lacked the same default model as RAGChecker.

What changed

  • Keep the Bedrock model default on extractor_name and checker_name.
  • Leave extractor_api_base and checker_api_base unset unless explicitly provided.
  • Move the heavier evaluator/container imports into main so CLI argument parsing can be tested without model/runtime dependencies.
  • Add unittest coverage for the default and explicit api_base behavior.

Validation

  • python -m unittest discover -s tests -v
  • python -m py_compile ragchecker\cli.py tests\test_cli.py
  • git diff --check

Risk / follow-up

Low risk: the change only affects CLI defaults and keeps explicit api_base overrides intact.

Fixes #37.

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.

CLI fails with Bedrock models unless

1 participant