MCPcopy Create free account
hub / github.com/avibe-bot/avibe / _auth_json_api_key

Method _auth_json_api_key

modules/agents/opencode/server.py:582–592  ·  view source on GitHub ↗
(provider_id: str)

Source from the content-addressed store, hash-verified

580
581 @staticmethod
582 def _auth_json_api_key(provider_id: str) -> Optional[str]:
583 try:
584 auth_entries = read_opencode_provider_auth_entries(logger_instance=logger)
585 except Exception as exc:
586 logger.debug("Could not read OpenCode auth entries for provider diagnostic: %s", exc)
587 return None
588 auth_entry = auth_entries.get(provider_id)
589 if not isinstance(auth_entry, dict) or auth_entry.get("type") != "api":
590 return None
591 key = auth_entry.get("key")
592 return key if isinstance(key, str) and key else None
593
594 @staticmethod
595 def _append_provider_endpoint(base_url: str, endpoint_path: str) -> str:

Callers 1

Calls 2

getMethod · 0.45

Tested by

no test coverage detected