Save API key to config (prevents saving placeholder keys).
(self, api_key: str)
| 97 | return api_key |
| 98 | |
| 99 | def save_api_key(self, api_key: str): |
| 100 | """Save API key to config (prevents saving placeholder keys).""" |
| 101 | # Don't save placeholder keys |
| 102 | if api_key == "sk-temp-placeholder": |
| 103 | return |
| 104 | config = self.get_config() |
| 105 | config['openrouter_api_key'] = api_key |
| 106 | self.save_config(config) |
| 107 | |
| 108 | def clear_placeholder_api_key(self): |
| 109 | """Remove placeholder API key from config if it exists.""" |