MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / assertSubscriptionAuthReady

Function assertSubscriptionAuthReady

src/api/agent-server-adapter.ts:1069–1079  ·  view source on GitHub ↗
(
  agentSettings: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

1067 * mid-conversation token expiry gracefully.
1068 */
1069export async function assertSubscriptionAuthReady(
1070 agentSettings: Record<string, unknown>,
1071): Promise<void> {
1072 const llm = toRecord(agentSettings.llm);
1073 if (!isSubscriptionLlmConfig(llm)) return;
1074
1075 const status = await LLMSubscriptionService.getOpenAIStatus();
1076 if (!status.connected) {
1077 throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR);
1078 }
1079}
1080
1081export async function buildStartConversationRequestWithEncryptedSettings(options: {
1082 settings: Settings;

Calls 3

isSubscriptionLlmConfigFunction · 0.90
toRecordFunction · 0.85
getOpenAIStatusMethod · 0.80

Tested by

no test coverage detected