Files
boc/landvex/node_modules/openai/providers/bedrock.mjs
T
Bernt 6989a98d75 feat: Passwordless cross-device authentication
- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
2026-07-07 07:11:50 +00:00

22 lines
997 B
JavaScript

import * as Errors from "../error.mjs";
import { createProvider } from "../internal/provider.mjs";
import { resolveBedrockBearerAuth, resolveBedrockEndpoint, } from "../internal/bedrock.mjs";
/** Configure the standard OpenAI client for Amazon Bedrock using bearer authentication. */
export function bedrock(options = {}) {
const { baseURL } = resolveBedrockEndpoint(options);
const { factory } = resolveBedrockBearerAuth(options);
if (!factory) {
throw new Errors.OpenAIError('Bedrock bearer authentication requires an `apiKey`, `tokenProvider`, or `AWS_BEARER_TOKEN_BEDROCK`. For AWS credential authentication, import `bedrock` from `openai/providers/bedrock/aws`.');
}
return createProvider({
configure() {
const auth = factory();
return {
name: 'bedrock',
baseURL,
prepareRequest: auth.prepareRequest.bind(auth),
};
},
});
}
//# sourceMappingURL=bedrock.mjs.map