INNER CODE UNIT · Python
admin_get_config
SPThole/CoexistAI · app.py:302
async def admin_get_config():
"""Return the effective model_config plus helper globals for the admin UI."""
# safe copy of model
# include openai_compatible and host/port defaults
def _mask(s):
try:
if not s:
return ''
s = str(s)
if len(s) <= 6:
return '*' * len(s)
return s[:3] + '...' + s[-3:]
except Exception:
return ''
cfg = dict(model_config)
cfg['_meta'] = {
'openai_compatible': openai_compatible,