Skip to content

Support dangerouslyAllowBrowser for Anthropic #3041

Description

@maybebansky

Feature Description

I need to set dangerouslyAllowBrowser to true which you're able to do with the Anthropic SKD. However I don't think you can do this with the ai library?

anthropics/anthropic-sdk-typescript#248 (comment)

import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: null,
  dangerouslyAllowBrowser: true
});

There are legitimate reasons for needing to do this: https://simonwillison.net/2024/Aug/23/anthropic-dangerous-direct-browser-access/

Use Case

For internal tools exposed to trusted users, or you can implement a “bring your own API key” pattern where users supply their own key to use with your client-side app.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions