[Bug]: TypeError : Object of type ModelMetaclass is not JSON serializable when using SqliteLogger

### Describe the bug

when using SqliteLogger, "log_chat_completion" fails with:
`Object of type ModelMetaclass is not JSON serializable`

### Steps to reproduce
```python
from autogen import LLMConfig, runtime_logging
from autogen.agents.experimental import DocAgent

llm_config = LLMConfig(api_type="openai", model="gpt-4o")

runtime_logging.start(logger_type="sqlite")
# Create our DocAgent
with llm_config:
    document_agent = DocAgent()

# Update this path to suit your environment
response = document_agent.run(
    message="Can you ingest ../test/agentchat/contrib/graph_rag/Toast_financial_report.pdf and tell me the fiscal year 2024 financial summary?",
    max_turns=1
)

# Iterate through the chat automatically with console output
response.process()
```

### Model Used

_No response_

### Expected Behavior

To successfully log the chat completion.

### Screenshots and logs

```text
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], [line 18](vscode-notebook-cell:?execution_count=1&line=18)
     12 response = document_agent.run(
     13     message="Can you ingest ../test/agentchat/contrib/graph_rag/Toast_financial_report.pdf and tell me the fiscal year 2024 financial summary?",
     14     max_turns=1
     15 )
     17 # Iterate through the chat automatically with console output
---> [18](vscode-notebook-cell:?execution_count=1&line=18) response.process()

File ~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/run_response.py:199, in RunResponse.process(self, processor)
    197 def process(self, processor: Optional[EventProcessorProtocol] = None) -> None:
    198     processor = processor or ConsoleEventProcessor()
--> [199](https://file+.vscode-resource.vscode-cdn.net/Users/laztoum/Projects/waldiez/code/waldiez/.local/~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/run_response.py:199)     processor.process(self)

File ~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/processors/console_event_processor.py:19, in ConsoleEventProcessor.process(self, response)
     18 def process(self, response: "RunResponseProtocol") -> None:
---> [19](https://file+.vscode-resource.vscode-cdn.net/Users/laztoum/Projects/waldiez/code/waldiez/.local/~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/processors/console_event_processor.py:19)     for event in response.events:
     20         self.process_event(event)

File ~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/run_response.py:154, in RunResponse._queue_generator(self, q)
    151         break
    153     if isinstance(event, ErrorEvent):
--> [154](https://file+.vscode-resource.vscode-cdn.net/Users/laztoum/Projects/waldiez/code/waldiez/.local/~/hatch/env/waldiez/JAjQJuK7/waldiez/lib/python3.13/site-packages/autogen/io/run_response.py:154)         raise event.content.error  # type: ignore[attr-defined]
    155 except queue.Empty:
...
    179     """
--> [180](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/Cellar/python@3.13/3.13.3/Frameworks/Python.framework/Versions/3.13/lib/python3.13/json/encoder.py:180)     raise TypeError(f'Object of type {o.__class__.__name__} '
    181                     f'is not JSON serializable')

TypeError: Object of type ModelMetaclass is not JSON serializable
```


### Additional Information

ag2 version: 0.9.6
OS: any
python version: 3.13.3

Labels: bug
State: closed