Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ai.model("Claude 3.5 Haiku") from @aws-amplify/backend links to the wrong ModelId #2270

Closed
victoravr opened this issue Nov 26, 2024 · 2 comments
Labels
data Issue pertaining to Amplify Data pending-community-response Issue is pending a response from the author or community pending-response Issue is pending response from author pending-triage Incoming issues that need categorization

Comments

@victoravr
Copy link

Environment information

Binaries:
  Node: 23.3.0 - /opt/homebrew/bin/node
  Yarn: undefined - undefined
  npm: 10.9.0 - /opt/homebrew/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.5.0
  @aws-amplify/backend: 1.8.0
  @aws-amplify/backend-auth: 1.4.1
  @aws-amplify/backend-cli: 1.4.2
  @aws-amplify/backend-data: 1.2.1
  @aws-amplify/backend-deployer: 1.1.9
  @aws-amplify/backend-function: 1.8.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.3
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.3
  @aws-amplify/cli-core: 1.2.0
  @aws-amplify/client-config: 1.5.2
  @aws-amplify/deployed-backend-client: 1.4.2
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.9
  @aws-amplify/platform-core: 1.2.1
  @aws-amplify/plugin-types: 1.5.0
  @aws-amplify/sandbox: 1.2.6
  @aws-amplify/schema-generator: 1.2.5
  aws-amplify: 6.9.0
  aws-cdk: 2.170.0
  aws-cdk-lib: 2.170.0
  typescript: 5.7.2

Describe the bug

Instead of auto generated:
... resourcePath: '/model/anthropic.claude-3-5-haiku-20241022-v1:0/converse',
It should be:
... resourcePath: '/model/anthropic.claude-3-haiku-20240307-v1:0/converse',

as per currently supported https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html
ModelId: anthropic.claude-3-haiku-20240307-v1:0

Reproduction steps

import { type ClientSchema, a, defineData } from "@aws-amplify/backend"

const schema = a.schema({
  placeholder: a
    .generation({
      aiModel: a.ai.model("Claude 3.5 Haiku"),
      systemPrompt:
        "You are an assistant...",
    })
    .arguments({
      text: a.string(),
    })
    .returns(a.string())
    .authorization((allow) => allow.guest()),
})
@victoravr victoravr added the pending-triage Incoming issues that need categorization label Nov 26, 2024
@ykethan
Copy link
Member

ykethan commented Nov 26, 2024

Hey @victoravr, thank you for reaching out. The Amplify AI kit does support both Claude 3.5 Haiku and Claude 3 Haiku
Claude 3.5 Haiku | anthropic.claude-3-5-haiku-20241022-v1:0
Claude 3 Haiku | anthropic.claude-3-haiku-20240307-v1:0

https://docs.amplify.aws/react/ai/concepts/models/#anthropic

If you are looking to use Claude 3 Haiku you should be able to to update the Data schema to a.ai.model("Claude 3 Haiku"),

@ykethan ykethan added pending-response Issue is pending response from author data Issue pertaining to Amplify Data pending-community-response Issue is pending a response from the author or community labels Nov 26, 2024
@ykethan
Copy link
Member

ykethan commented Dec 10, 2024

Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Issue pertaining to Amplify Data pending-community-response Issue is pending a response from the author or community pending-response Issue is pending response from author pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

2 participants