Repository: langchain
Issue: langchain template list - 404 and never loads package
Labels: 🤖:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```zsh
# langchain templates list
```


### Error Message and Stack Trace (if applicable)

```bash
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/mlosey/.local/pipx/venvs/langchain-cli/lib/python3.13/site-packages/langchain_cli/namespa │
│ ces/template.py:152 in list                                                                      │
│                                                                                                  │
│   149 │   """                                                                                    │
│   150 │   from langchain_cli.utils.github import list_packages                                   │
│   151 │                                                                                          │
│ ❱ 152 │   packages = list_packages(contains=contains)                                            │
│   153 │   for package in packages:                                                               │
│   154 │   │   typer.echo(package)                                                                │
│   155                                                                                            │
│                                                                                                  │
│ ╭──── locals ─────╮                                                                              │
│ │ contains = None │                                                                              │
│ ╰─────────────────╯                                                                              │
│                                                                                                  │
│ /Users/mlosey/.local/pipx/venvs/langchain-cli/lib/python3.13/site-packages/langchain_cli/utils/g │
│ ithub.py:24 in list_packages                                                                     │
│                                                                                                  │
│   21 │                                                                                           │
│   22 │   data = json.loads(res_str)                                                              │
│   23 │   package_names = [                                                                       │
│ ❱ 24 │   │   p["name"] for p in data if p["type"] == "dir" and p["name"] != "docs"               │
│   25 │   ]                                                                                       │
│   26 │   package_names_filtered = (                                                              │
│   27 │   │   [p for p in package_names if contains in p] if contains else package_names          │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │     conn = <http.client.HTTPSConnection object at 0x1067daf90>                               │ │
│ │ contains = None                                                                              │ │
│ │     data = {                                                                                 │ │
│ │            │   'message': 'Not Found',                                                       │ │
│ │            │   'documentation_url':                                                          │ │
│ │            'https://docs.github.com/rest/repos/contents#get-repository-content',             │ │
│ │            │   'status': '404'                                                               │ │
│ │            }                                                                                 │ │
│ │  headers = {                                                                                 │ │
│ │            │   'Accept': 'application/vnd.github+json',                                      │ │
│ │            │   'X-GitHub-Api-Version': '2022-11-28',                                         │ │
│ │            │   'User-Agent': 'langchain-cli'                                                 │ │
│ │            }                                                                                 │ │
│ │      res = <http.client.HTTPResponse object at 0x1067c8550>                                  │ │
│ │  res_str = b'{"message":"Not                                                                 │ │
│ │            Found","documentation_url":"https://docs.github.com/rest/repos/c'+47              │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: string indices must be integers, not 'str'
```


### Description

* I'm trying to use langchain-cli to list the available template packages
* I expect to see some sort of output that is a list of packages.... 
* Fails on 404, can't find the packages/templates.



### System Info

System Information
------------------
> OS:  Darwin
> OS Version:  Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000
> Python Version:  3.13.0 (main, Oct  7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.4)]

Package Information
-------------------
> langchain_core: 0.2.43
> langsmith: 0.1.142
> langchain_cli: 0.0.31
> langserve: 0.2.3

Optional packages not installed
-------------------------------
> langgraph

Other Dependencies
------------------
> fastapi: 0.115.4
> gitpython: 3.1.43
> gritql: 0.1.5
> httpx: 0.27.2
> jsonpatch: 1.33
> langserve[all]: Installed. No version info available.
> orjson: 3.10.11
> packaging: 24.2
> pydantic: 1.10.19
> pyproject-toml: 0.0.10
> PyYAML: 6.0.2
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> sse-starlette: 1.8.2
> tenacity: 8.5.0
> tomlkit: 0.12.5
> typer[all]: Installed. No version info available.
> typing-extensions: 4.12.2
> uvicorn: 0.23.2