Skip to content
View Hasnaathussain's full-sized avatar

Highlights

  • Pro

Block or report Hasnaathussain

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Hasnaathussain/README.md

Hasnaat Hussain - AI Systems Architect & Agentic Engineer

⚡ HASNAAT HUSSAIN ⚡

AI Systems Architect • Agentic Engineer • Advanced Systems & Algorithms • Full-Stack Developer

GitHub followers GitHub stars Specialization Profile views


🧬 Engineering Philosophy & Focus

I design and engineer intelligent systems at the intersection of Generative AI, multi-agent orchestration, and high-performance backend systems. I specialize in optimizing LLM routing layers, resolving race conditions and state corruption in agentic memory models, and building reliable, scalable developer tooling.


🚀 Active Pull Requests & OSS Impact

I actively contribute to the core frameworks powering the modern AI/ML and data visualization ecosystems. Here is my live portfolio:

Repository Stars Contribution Impact Area & Engineering Solution
pydantic/pydantic-ai ★ 8k+ PR #6105 (Closed)
PR #6096 (Open)
PR #6098 (Open)
Gemini 3, Bedrock Converse, & TestModel metadata: Gated Gemini 3 tool configurations, resolved Bedrock Converse API ValidationException when user turns carry media/attachment files immediately after tool results, and aligned provider name metadata in TestModel responses.
bentoml/BentoML ★ 15k PR #5643 (Open) SDK Robustness: Prevented index crash when parsing unparameterized bare generic return annotations (like t.Iterator, t.Generator).
AnswerDotAI/fasthtml ★ 10k PR #894 (Open) Wrapper Isolation: Renamed internal parameter from f to _f in _handle to prevent keyword parameter naming conflicts when developers accept an f parameter in endpoints.
tobymao/sqlglot ★ 6k PR #7807 (Open) SQL AST Parser Precision: Restructured parentheses tuple parsing priorities to retain multiple items inside nested SQLite tuples when containing subqueries.
crewAIInc/crewAI ★ 20k PR #6377 (Open) Tool Return Validation: Automatically serialize custom tool outputs containing dictionary/list structures to valid JSON strings to prevent agent runtime failures.
BerriAI/litellm ★ 51.5k PR #31081 (Open)
PR #31070 (Open)
Router Hardening & Discovery Security: Gracefully prunes unsupported model effort parameters on Anthropic Vertex/Bedrock endpoints, and secured discovery routes to prevent budget leakage for internal developers.
plotly/plotly.js ★ 17k PR #7768 (Open) Formatting Engine Precision: Resolved broken formatting in numFormat logic for extremely small numbers, ensuring reliable decimal/exponential rendering alongside robust Jasmine coverage.
getzep/graphiti ★ 7k PR #1604 (Open) Context Constraint Control: Fixed OpenAI-compatible client configurations to dynamically bind LLMConfig.max_tokens when integrating local LLM engines (Ollama, vLLM).
ashishpatel26/500-AI-Agents-Projects ★ 1.8k PR #109 (Open) Agent Use Cases Catalog: Contributed 15 framework-grouped agent use cases across CrewAI, LangGraph, and AutoGen.
e2b-dev/awesome-ai-agents ★ 4.2k PR #840 (Open) Ecosystem Additions: Contributed reference links and tool integrations for custom multi-agent execution engines.
langchain-ai/langchain ★ 100k PR #38382 (Closed) Multi-Agent Memory Eviction: Designed a deterministic pruning algorithm in SummarizationMiddleware to prevent orphaned ToolMessage corruption, blocking downstream HTTP 400 validation issues.
huggingface/transformers ★ 130k PR #46793 (Closed) Chat Template Resiliency: Fixed transformers generation configurations to robustly handle edge cases with empty conversations, preventing runtime IndexError exceptions.
keras-team/keras ★ 60k PR #22757 (Closed) Deserialization Validation: Introduced strict type checks for trainable parameters during Keras deserialization runs to prevent model compile-time issues.

🛠️ Interactive Engineering Deep-Dives

Click below to expand and view technical post-mortems of major system bugs I solved:

🤖 Pydantic AI: Code Execution & Native Tools Conflict
  • The Problem: On Gemini 3 models, combining built-in CodeExecutionTool with custom user function tools crashed the API (HTTP 400) because include_server_side_tool_invocations was never set.
  • The Fix: Patched the config generator inside the GoogleModel adapter to ensure parameters are properly configured when mixing built-in code execution tools with custom local calling routines.
🌐 LiteLLM Proxy: Parameter Pruning & Budget Routing
  • The Problem: Vertex AI and Bedrock backends crashed when router clients passed modern Anthropic parameters (e.g., thinking, output_config) to models that did not advertise support for them.
  • The Fix: Configured the Anthropic pass-through endpoint to dynamically strip unsupported effort parameters before routing requests, protecting clients against HTTP 400 validation errors.
📊 Plotly.js: Floating-Point exponential Axis Rounding
  • The Problem: When graphing extremely small numbers where String(v) naturally returns exponential notation, Plotly's axis formatting engine sliced directly into the exponent, rendering broken labels.
  • The Fix: Replaced fragile regex slicing with clean mantissa isolation via toFixed, re-attaching the exponent at the end of the formatting pipeline.
🦜🔗 LangChain: Multi-Agent memory state corruption
  • The Problem: When SummarizationMiddleware pruned agent history, it cleared parent AIMessage objects but left behind orphaned ToolMessages, causing downstream validation crashes.
  • The Fix: Developed a cohesive pruning algorithm that validates parent-child message bonds to ensure paired messages are evicted together.

🛠️ Tech Stack & Highlights


📈 Developer Metrics & Habits

Hasnaat's GitHub Stats Hasnaat's GitHub Streak

Top Languages

Hasnaat's Live GitHub Metrics Infographic

Hasnaat's Activity Graph


💬 Engage & Collaborate

I am always keen to discuss advanced multi-agent orchestrations, systems optimizations, or robust OSS debugging.

Pinned Loading

  1. keras-team/keras keras-team/keras Public

    Deep Learning for humans

    Python 64.1k 19.7k

  2. BerriAI/litellm BerriAI/litellm Public

    Python SDK, Proxy Server (AI Gateway) to call 100+ LLM APIs in OpenAI (or native) format, with cost tracking, guardrails, loadbalancing and logging. [Bedrock, Azure, OpenAI, VertexAI, Cohere, Anthr…

    Python 51.8k 9.3k

  3. run-llama/llama_index run-llama/llama_index Public

    LlamaIndex is the leading document agent and OCR platform

    Python 50.5k 7.6k

  4. getzep/graphiti getzep/graphiti Public

    Build Real-Time Knowledge Graphs for AI Agents

    Python 28.1k 2.8k

  5. plotly/plotly.js plotly/plotly.js Public

    Open-source JavaScript charting library behind Plotly and Dash

    JavaScript 18.2k 2k

  6. pydantic/pydantic-ai pydantic/pydantic-ai Public

    AI Agent Framework, the Pydantic way

    Python 18k 2.3k