(provider_id: str)
| 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: |
no test coverage detected