Merge pull request #41860 from BerriAI/litellm_router_settings_doc_table_parse

test(docs): read only the first column of the router_settings reference table
This commit is contained in:
Mateo Wang 2026-09-18 13:03:51 -07:00 committed by GitHub
commit 57377c9249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,9 +51,7 @@ try:
if general_settings_section:
# Extract the table rows, which contain the documented keys
table_content = general_settings_section.group(1)
doc_key_pattern = re.compile(
r"\|\s*([^\|]+?)\s*\|"
) # Capture the key from each row of the table
doc_key_pattern = re.compile(r"^\|\s*([^\|]+?)\s*\|", re.MULTILINE)
documented_keys.update(doc_key_pattern.findall(table_content))
except Exception as e:
raise Exception(